1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

passing unique parameter to belongs_to wrongly

passing `unique` parameter to belongs_to not right,
This commit is contained in:
0oneo 2017-03-03 22:22:27 +08:00
parent fd8da71118
commit 8b4e39b13d

View file

@ -154,7 +154,7 @@ case, the column definition might look like this:
```ruby
create_table :accounts do |t|
t.belongs_to :supplier, index: true, unique: true, foreign_key: true
t.belongs_to :supplier, index: { unique: true }, foreign_key: true
# ...
end
```