Oh LOL No Problem I’ll give that a try..

> On Sep 23, 2015, at 10:51 AM, Dale Ackerman <[email protected]> wrote:
> 
> Hi Jeremy;
> 
> I am getting undefined method `to_xml' for #<Array:0x5db473b6>
> 
> Do I need to require something else?  I am on JRuby 1.7.19  and will be 
> moving to 9.0.1.0 soon 
> 
> On Tuesday, September 22, 2015 at 8:23:04 PM UTC-5, Jeremy Evans wrote:
> On Tuesday, September 22, 2015 at 1:31:24 PM UTC-7, Dale Ackerman wrote:
> Hi I have a API application that is serving up JSON it has a combination 
> models and more complex plain SQL like  DB['SELECT * ...']  how can I call a
> 
> DB['SELECT * ...'].all.to_xml on the resultset?
> 
> You currently can't, as xml_serializer is a model plugin, not a dataset 
> extension.  There is a fairly simple workaround:
> 
> c = Class.new(Sequel::Model)
> c.plugin :xml_serializer
> c.dataset = DB['SELECT * ...']
> c.all.to_xml
> 
> Thanks,
> Jeremy
> 
> -- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "sequel-talk" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/sequel-talk/8tKsrIyPofA/unsubscribe 
> <https://groups.google.com/d/topic/sequel-talk/8tKsrIyPofA/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to 
> [email protected] 
> <mailto:[email protected]>.
> To post to this group, send email to [email protected] 
> <mailto:[email protected]>.
> Visit this group at http://groups.google.com/group/sequel-talk 
> <http://groups.google.com/group/sequel-talk>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to