rails/rails — pull request #12642 by ka8725 (2013-10-25 12:16:08+00:00)
Title: Improve usage example for model generator decimal field

We should wrap parameters to quotes when pass parameters with curly braces to decimal generator because the shell (I use OS X, and also it tested on Debian) transforms them to several params. Example:

```shell
$ echo p{1,2}
p1 p2
```

So actual example (`rails generate model product price:decimal{10,2}`) generates migration like this:

```ruby
class CreateProducts < ActiveRecord::Migration
def change
create_table :products do |t|
t.decimal10 :price
t.decimal2 :price

t.timestamps
end
end
end
```

Fixed version of the command (`rails generate model product 'price:decimal{10,2}'`) generates correct migration:

```ruby
class CreateProducts < ActiveRecord::Migration
def change
create_table :products do |t|
t.decimal :price, precision: 10, scale: 2

t.timestamps
end
end
end
```