> Is there a way to add arbitrary parameters to the JSON output from Sequel?

you can

  stuff.to_json(include: :some_method)

or perhaps

  stuff.to_json(include: { some_method: { include: :some_deep_method } })

you just need to define those methods.

if you dont want this kind of logic into your models, you can:

  {
    stuff: stuff,
    some_method: {
      some_deep_method: 666
    }
  }.to_json()

-- 
dota? =op

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