Sha256: 44025ca5a61d831931561ce3058ab48b3b14bbec053bbad99ab5722be616e3f0

Contents?: true

Size: 857 Bytes

Versions: 6

Compression:

Stored size: 857 Bytes

Contents

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

    Attribute pairs are key_name:mongo_type arguments specifying the
    model's attributes. Timestamps and Userstamps are added by default.

Examples:
    `./script/generate embedded_model account`

        creates an Account model:
            Model:      app/models/account.rb

    `./script/generate embedded_model post title:string body:string published:boolean`

        creates a Post model with a string title, string body, published flag, timestamps! and userstamps!.

    `./script/generate embedded_model post --skip-timestamps`

        creates a Post model with no timestamps.

    `./script/generate embedded_model post --skip-userstamps`

        creates a Post model with no userstamps.

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
mongo_mapper_generators-1.0.5 rails_generators/embedded_model/USAGE
mongo_mapper_generators-1.0.4 rails_generators/embedded_model/USAGE
mongo_mapper_generators-1.0.3 rails_generators/embedded_model/USAGE
mongo_mapper_generators-1.0.2 rails_generators/embedded_model/USAGE
mongo_mapper_generators-1.0.1 rails_generators/embedded_model/USAGE
mongo_mapper_generators-1.0.0 rails_generators/embedded_model/USAGE