Sha256: 89ebe318788a085a695ba098b95ced40a2d0e359a6e3c11f66adaf5574b3aa40

Contents?: true

Size: 845 Bytes

Versions: 6

Compression:

Stored size: 845 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 mongo_model account`

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

    `./script/generate mongo_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 mongo_model post --skip-timestamps`

        creates a Post model with no timestamps.

    `./script/generate mongo_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/mongo_model/USAGE
mongo_mapper_generators-1.0.4 rails_generators/mongo_model/USAGE
mongo_mapper_generators-1.0.3 rails_generators/mongo_model/USAGE
mongo_mapper_generators-1.0.2 rails_generators/mongo_model/USAGE
mongo_mapper_generators-1.0.1 rails_generators/mongo_model/USAGE
mongo_mapper_generators-1.0.0 rails_generators/mongo_model/USAGE