On Dec 22, 2:31 pm, "pbo...@gmail.com" <pbo...@gmail.com> wrote:
> This works, but what if I want to add other json object that aren't in
> orders? Ext JS needs a "count" param for it's client side
> pagination. So I originally had this:
>
> format.json { render :json => { :order => @orders, :count =>
> @orders.size } }
format.json { render :json => { :order => @orders, :count =>
@orders.size }.to_json }
Fred
>
> I couldn't figure out how to use to_json in this situation.
>
> On Dec 20, 10:19 am, Frederick Cheung <frederick.che...@gmail.com>
> wrote:
>
>
>
> > render :json => @orders.to_json(...)
>
> > Fred
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---