Hello again,
I’m trying to use a grid control from EXTjs with RoR, and I’m following
some exampe I found on the web, and adapting to my test database …
I can’t see any row, the grid is only a poor line, I use other extjs in
the same page, and they are ok.
Trying to debuging, I found that the error, or at least one error, is
when I apply the json …
Here’s the code:
If I comment the last line: render :text=>return_data.to_json,
:layout=>false I don’t get any error.
Any clue of what’s wrong ?
thanks,
raimon
return_data = Hash.new()
return_data[:Total] = @invoice_pages.item_count
return_data[:Movies] = @invoices.collect{|u| {:id=>u.id,
:factura=>u.factura,
:data=>u.data,
:client=>u.tipus,
:total_base=>u.total_base,
:total_iva=>u.total_iva,
:total=>u.total} }
render :text=>return_data.to_json, :layout=>false