Git Product home page Git Product logo

ext_scaffold's Introduction

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 [email protected], released under the MIT license

ext_scaffold's People

Contributors

martinrehfeld avatar muellerc avatar smbrant avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.