On Tuesday, May 30, 2017 at 6:01:03 PM UTC-7, dota? =op wrote:
>
> > There currently isn't a good way to do it using the json_serializer 
> plugin, 
> > unless you want to add model instance methods for it.  I'm considering 
> > having to_json take a block that yields the hash, and then serializing 
> the 
> > block's return value to JSON, but haven't implemented that yet. 
>
> wat do you think about having a `to_json_hash()` or something liek 
> that? this way we would be able to just get teh hash without 
> cerealizing to jason at all. 
>

If you want that method, it's easy to implement using the API I suggested:

  def to_json_hash(*a)
    to_json(*a){|h| return h}
  end

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 https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to