From ebfe41ca2126132e780b47f73245d8f4e4a13187 Mon Sep 17 00:00:00 2001 From: Matthew Michihara Date: Sun, 5 May 2013 16:00:18 -0700 Subject: Improve model generator USAGE grammar --- railties/lib/rails/generators/rails/model/USAGE | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'railties/lib/rails/generators') 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}` -- cgit v1.2.3