diff options
author | Genadi Samokovarov <gsamokovarov@gmail.com> | 2016-08-10 10:44:08 +0300 |
---|---|---|
committer | Genadi Samokovarov <gsamokovarov@gmail.com> | 2016-08-10 10:44:08 +0300 |
commit | 01fbdb311d0661b4db89024a9b1c9fafcaceaafd (patch) | |
tree | da472dc6e02f65c4b14edd471150629db8f22c37 /guides/source/kindle | |
parent | 7b31b06d4afd73734ac54cbbac105f0eab8d0d43 (diff) | |
download | rails-01fbdb311d0661b4db89024a9b1c9fafcaceaafd.tar.gz rails-01fbdb311d0661b4db89024a9b1c9fafcaceaafd.tar.bz2 rails-01fbdb311d0661b4db89024a9b1c9fafcaceaafd.zip |
Fix a NoMethodError schema_statements.rb
If you call `remove_index` with wrong options, say a type, like I did,
you get:
```
== 20160810072541 RemoveUniqueIndexOnGoals: migrating =========================
-- remove_index(:goal, {:coulmn=>:kid_id, :unique=>true})
rails aborted!
StandardError: An error has occurred, this and all later migrations canceled:
undefined method `ArgumentError' for #<ActiveRecord::ConnectionAdapters::PostgreSQLAdapter:0x007fb7dec91b28>
```
What happened is that I mistyped column (coulmn) and got a
`NoMethodError`, because of a missing comma during the raise. This made
Ruby think we're calling the method `ArgumentError`.
Diffstat (limited to 'guides/source/kindle')
0 files changed, 0 insertions, 0 deletions