views:

581

answers:

1

I use Rails for building a web application. I want to create a list of records and display this list using ExtJS and its Grid module.

What is the best way to pass my data from Rails to ExtJS? It would be nice, if the ExtJS code gets rendered while rendering the html, so no AJAX-calls are needed.

Best regards

+2  A: 

Here is a perfect howto:

http://extjs.com/learn/Tutorial:Using_Ext_Grid_with_Ruby_on_Rails

Beffa
Also, the [Whorm](http://github.com/christocracy/whorm) gem makes it easy to return ActiveRecord objects in Json format with subsets of the models attributes.
Daniel Beardsley