Hey Jeremy, 

Is the code to yield the hash actually in sequel?

I was looking at the most recent releases (and master) and couldn't find it.

Aryk

On Wednesday, June 14, 2017 at 8:11:50 AM UTC-7, Jeremy Evans wrote:
>
> On Wednesday, June 14, 2017 at 7:50:53 AM UTC-7, Elanor Riley wrote:
>>
>> Well, .to_json works fine when you don't need the extra parameters for 
>> normal data table usage.
>>
>
> The example you showed is not just extra parameters, it's a completely 
> different format for the data itself (model instance as an array instead of 
> a hash).
>  
>
>> But the server side processing requirements facilitate the need for those 
>> extra attributes. I was hoping to be able to just *insert* them somehow 
>> while also utilizing the nice function of .to_json by default. Especially 
>> because the query I'm using has some complex associations.
>>
>
> For just being able to insert extra attributes, having to_json yield to a 
> block would make that easy.  But assuming you actually want to generate 
> JSON similar to what you showed, you are definitely better off with your 
> own method.
>
> 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