Wednesday, January 23rd, 2008
Ext Scaffold Generator Plugin for Rails

Martin Rehfeld has released a Rails plugin that generates Ext JS scaffolds
The Ext Scaffold Generator Plugin provides a custom MIME type alias :ext_json to be able to handle requests from the Ext frontend separately. The generated controllers show how to do this.
To make data delivery to the Ext frontend easy, the plugin extends the Array and ActiveRecord::Base classes to provide a to_ext_json method. Here’s a simplified example of a potential index method in a PostsController:
RUBY:# GET /posts
# GET /posts.ext_json
def index
respond_to do |format|
format.html # index.html.erb (will fire ext_json request)
format.ext_json { render :json => Post.find(:all).to_ext_json }
end
end
He also has some other good articles on integrating Ext JS and Rails in general.
- Background Presentation: Ext JS and Rails, how do they get along?
- Ext JS already the 3rd most used Web Framework












Perfect timing. We are currently building an Ext App with Rails and this comes in handy. Thanks for the article!
Hi Dion, thx for the friendly coverage on my Ext Scaffold Generator. I just added another article to the Ext and Rails series on GL Networks Inside: Tutorial: Howto use the Ext JS Treeview (Ext.tree) with Ruby on Rails
Check it out if you get a chance.
Cheers,
Martin