Sha256: c0182eca68d2ff37ee0d33f4b8e22f562aafa9e6ea4c609a2aa2a3c2e9e7d979

Contents?: true

Size: 732 Bytes

Versions: 104

Compression:

Stored size: 732 Bytes

Contents

Description:
    Invokes the active_record:model generator, but the generated
    model file contains the fields block, (and the migration option
    is false by default).

Examples:
    $ rails generate declare_schema:model account

        creates an Account model, test and fixture:
            Model:      app/models/account.rb
            Test:       test/unit/account_test.rb
            Fixtures:   test/fixtures/accounts.yml

    $ rails generate declare_schema:model post title:string body:text published:boolean

        creates a Post model with a string title, text body, and published flag.

After the model is created, and the fields are specified, use declare_schema:migration
to create the migrations incrementally.

Version data entries

104 entries across 104 versions & 1 rubygems

Version Path
declare_schema-2.3.1 lib/generators/declare_schema/model/USAGE
declare_schema-2.3.0 lib/generators/declare_schema/model/USAGE
declare_schema-2.3.0.pre.is.0 lib/generators/declare_schema/model/USAGE
declare_schema-2.2.1 lib/generators/declare_schema/model/USAGE
declare_schema-2.2.0.colin.1 lib/generators/declare_schema/model/USAGE
declare_schema-2.2.0 lib/generators/declare_schema/model/USAGE
declare_schema-2.1.0 lib/generators/declare_schema/model/USAGE
declare_schema-2.1.0.pre.1 lib/generators/declare_schema/model/USAGE
declare_schema-1.4.0 lib/generators/declare_schema/model/USAGE
declare_schema-1.4.0.colin.11 lib/generators/declare_schema/model/USAGE
declare_schema-1.3.6 lib/generators/declare_schema/model/USAGE
declare_schema-1.3.6.colin.1 lib/generators/declare_schema/model/USAGE
declare_schema-1.3.5 lib/generators/declare_schema/model/USAGE
declare_schema-1.3.5.colin.1 lib/generators/declare_schema/model/USAGE
declare_schema-1.4.0.colin.9 lib/generators/declare_schema/model/USAGE
declare_schema-1.3.4 lib/generators/declare_schema/model/USAGE
declare_schema-1.3.4.colin.1 lib/generators/declare_schema/model/USAGE
declare_schema-1.4.0.colin.8 lib/generators/declare_schema/model/USAGE
declare_schema-1.3.3 lib/generators/declare_schema/model/USAGE
declare_schema-1.3.3.colin.1 lib/generators/declare_schema/model/USAGE