public
Description: Generate full-featured scaffolds using the ExtJS framework.
Homepage: http://inside.glnetworks.de/2008/01/18/announcing-ext-scaffold-generator-plugin-for-rails/
Clone URL: git://github.com/martinrehfeld/ext_scaffold.git
Click here to lend your support to: ext_scaffold and make a donation at www.pledgie.com !
martinrehfeld (author)
Sun Nov 01 11:35:07 -0800 2009
commit  a2f50d3f5fcd9a316def9924f61a17959a3ebcc1
tree    b5ae76e65707d57febd774f11d457feae0a26979
parent  bc70b466605fee04ffd589a6f8274f29aace5911
name age message
file .gitignore Wed Feb 11 11:03:20 -0800 2009 Moved assets into template files and made them ... [Jonathan Barket]
file MIT-LICENSE Thu Jan 03 07:42:27 -0800 2008 extracted ext_scaffold plugin git-svn-id: svn+... [martinrehfeld]
file README.markdown Sun Nov 01 11:35:07 -0800 2009 adjust some paths for ExtJS 3.0 compatibility [martinrehfeld]
file Rakefile Thu Jan 03 07:42:27 -0800 2008 extracted ext_scaffold plugin git-svn-id: svn+... [martinrehfeld]
directory generators/ Sun Nov 01 11:35:07 -0800 2009 adjust some paths for ExtJS 3.0 compatibility [martinrehfeld]
file index.html Wed Dec 24 03:16:22 -0800 2008 github generated gh-pages branch [martinrehfeld]
file init.rb Sun Jan 06 03:29:33 -0800 2008 register ext_json MIME type on init git-svn-id... [martinrehfeld]
file install.rb Sun Nov 01 11:35:07 -0800 2009 adjust some paths for ExtJS 3.0 compatibility [martinrehfeld]
directory lib/ Sun Nov 09 15:52:01 -0800 2008 use border layout with detail form instead of s... [martinrehfeld]
directory tasks/ Thu Jan 03 07:42:27 -0800 2008 extracted ext_scaffold plugin git-svn-id: svn+... [martinrehfeld]
directory test/ Sun Nov 01 11:35:07 -0800 2009 adjust some paths for ExtJS 3.0 compatibility [martinrehfeld]
file uninstall.rb Thu Jan 03 07:42:27 -0800 2008 extracted ext_scaffold plugin git-svn-id: svn+... [martinrehfeld]
README.markdown

Ext Scaffold Reloaded

Scaffolds an entire resource, from model and migration to controller and views, along with a full test suite, just like the standard Rails scaffold generator. The ext_scaffold generator uses the Ext Javascript framwork to build the GUI elements (forms and tables).

Pass the name of the model, either CamelCased or under_scored, as the first argument, and an optional list of attribute pairs.

Attribute pairs are column_name:sql_type arguments specifying the model's attributes. Timestamps are added by default, so you don't have to specify them by hand as 'created_at:datetime updated_at:datetime'.

For example, ext_scaffold post title:string body:text published:boolean gives you a model with those three attributes, a controller that handles the create/show/update/destroy, Ext forms to create and edit your posts, and an Ext Grid index that lists them all, as well as a map.resources :posts declaration in config/routes.rb.

Prerequisites

You need to download the Ext Javascript framework from

http://www.extjs.com/products/extjs/download.php,

and unzip it into #{RAILS_ROOT}/public/ext. Ext_scaffold was tested against version 3.0 of the ExtJS framework.

Installation

script/plugin install git://github.com/martinrehfeld/ext_scaffold.git

Example

./script/generate ext_scaffold post # no attributes, view will be anemic

./script/generate ext_scaffold post title:string body:text published:boolean

./script/generate ext_scaffold purchase order_id:integer amount:decimal

Copyright (c) 2008 martin.rehfeld@glnetworks.de, released under the MIT license