On Thursday, April 30, 2015 at 4:09:53 PM UTC-7, Jon Mattingly wrote:
>
> Is there a method similar to calling object.to_json(:include => :relation) 
> when you're calling object.to_hash?
>
> Right now the best I've been able to come up with is mapping the object's 
> relation to the hash myself.
>

Not currently. Model#to_hash has always just been an alias for values.  I 
don't want to modify the Model#to_hash API, but I suppose I could consider 
adding a method.  I'm not sure it would be used enough to be in the core, 
it probably belongs in a plugin if it is added.

Thanks,
Jeremy

-- 
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