Sha256: 149f0571f004edffa8528dc4a810c272c8d8ba7813a0948b2f0502e05b51ad21

Contents?: true

Size: 987 Bytes

Versions: 22

Compression:

Stored size: 987 Bytes

Contents

Description:
    Stubs out a new model. Pass the model name under_scored (as you would like to name the file)
    and an optional list of attribute pairs as arguments.

    Attribute pairs are name:type arguments specifying the
    model's attributes.

    You don't have to think up every attribute up front, but it helps to
    sketch out a few so you can start working with the model immediately.

    If you pass a namespaced model name (e.g. admin/account)
    then the generator will create file inside specified path with namespaced
    class name (e.g App.Models.Admin.Account).

    Attribute names can be passed either CamelCased or under_scored (see example below).
    You can use the following types (capitalized or not):

        Date
        Integer
        Float
        Boolean
        Number
        String

Example:
    rails generate loco:model Article title content:string publishedAt:date

    This will create:
        app/assets/javascripts/models/article.coffee

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
loco-rails-2.5.3 lib/generators/loco/model/USAGE
loco-rails-2.5.2 lib/generators/loco/model/USAGE
loco-rails-2.5.1 lib/generators/loco/model/USAGE
loco-rails-2.5.0 lib/generators/loco/model/USAGE
loco-rails-2.4.0 lib/generators/loco/model/USAGE
loco-rails-2.3.0 lib/generators/loco/model/USAGE
loco-rails-2.2.2 lib/generators/loco/model/USAGE
loco-rails-2.2.1 lib/generators/loco/model/USAGE
loco-rails-2.2.0 lib/generators/loco/model/USAGE
loco-rails-2.1.0 lib/generators/loco/model/USAGE
loco-rails-2.0.0 lib/generators/loco/model/USAGE
loco-rails-1.5.2 lib/generators/loco/model/USAGE
loco-rails-1.5.1 lib/generators/loco/model/USAGE
loco-rails-1.5.0 lib/generators/loco/model/USAGE
loco-rails-1.4.0 lib/generators/loco/model/USAGE
loco-rails-1.3.3 lib/generators/loco/model/USAGE
loco-rails-1.3.2 lib/generators/loco/model/USAGE
loco-rails-1.3.1 lib/generators/loco/model/USAGE
loco-rails-1.3.0 lib/generators/loco/model/USAGE
loco-rails-1.0.2 lib/generators/loco/model/USAGE