Sha256: 60d063a7f8f2192e1c6e3af23e15d4cb5c8499e3a0ddcd50112cf1f88d47e5e8

Contents?: true

Size: 852 Bytes

Versions: 1

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 model Article title:string content:text`

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jfs-generators-0.2.0 rails_generators/jfs_model/USAGE