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