Sha256: 20921dc1512da3fd4bfc2021982d8fba57185a1a0c170717756aece44466278d

Contents?: true

Size: 852 Bytes

Versions: 2

Compression:

Stored size: 852 Bytes

Contents

Description:
    Stubs out a new model, including `attr_accessible` statement for attributes.
    Pass the model name, either CamelCased or under_scored, and an optional list
    of attribute pairs as arguments.

    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'.

    This generates a model class in app/models and a migration in db/migrate.

Examples:
    `script/generate jfs_model Account`

        Creates an Account model and migration:
            Model:      app/models/account.rb
            Migration:  db/migrate/XXX_create_accounts.rb

    `script/generate jfs_model Article title:string content:text`

        Creates an Article model with a string title and text body,.

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
jfs-generators-0.2.4 rails_generators/jfs_model/USAGE
jfs-generators-0.2.3 rails_generators/jfs_model/USAGE