diff options
author | Vijay Dev <vijaydev.cse@gmail.com> | 2013-05-12 15:57:14 +0530 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2013-05-12 15:57:14 +0530 |
commit | d8b8c0ef8717508c01ab21687666941008413906 (patch) | |
tree | bc148d9244b01f88a8547b4581818abe4ec138a5 /railties/lib | |
parent | a395c22fd3f55040c041a330c14b3676bfee29fc (diff) | |
parent | 1a9766f1280f9550ba1de4538fccd5ad51c557ac (diff) | |
download | rails-d8b8c0ef8717508c01ab21687666941008413906.tar.gz rails-d8b8c0ef8717508c01ab21687666941008413906.tar.bz2 rails-d8b8c0ef8717508c01ab21687666941008413906.zip |
Merge branch 'master' of github.com:lifo/docrails
Conflicts:
activesupport/lib/active_support/callbacks.rb
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/generators/rails/model/USAGE | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/railties/lib/rails/generators/rails/model/USAGE b/railties/lib/rails/generators/rails/model/USAGE index 1998a392aa..145d9ee6e0 100644 --- a/railties/lib/rails/generators/rails/model/USAGE +++ b/railties/lib/rails/generators/rails/model/USAGE @@ -46,18 +46,18 @@ Available field types: `rails generate model photo title:string album:references` - It will generate an album_id column. You should generate this kind of fields when - you will use a `belongs_to` association for instance. `references` also support - the polymorphism, you could enable the polymorphism like this: + It will generate an `album_id` column. You should generate these kinds of fields when + you will use a `belongs_to` association, for instance. `references` also supports + polymorphism, you can enable polymorphism like this: `rails generate model product supplier:references{polymorphic}` - For integer, string, text and binary fields an integer in curly braces will + For integer, string, text and binary fields, an integer in curly braces will be set as the limit: `rails generate model user pseudo:string{30}` - For decimal two integers separated by a comma in curly braces will be used + For decimal, two integers separated by a comma in curly braces will be used for precision and scale: `rails generate model product price:decimal{10,2}` |