diff options
author | yui-knk <spiketeika@gmail.com> | 2015-08-28 13:50:49 +0900 |
---|---|---|
committer | yui-knk <spiketeika@gmail.com> | 2015-08-28 13:50:49 +0900 |
commit | 2cc49df85a4b0232a804944caead6f288a20ad26 (patch) | |
tree | 8f416109a47bccf40a1ae6698e91e664087ee5b2 /activerecord/lib/active_record | |
parent | 2a6071a5e81cbc3b83625f5e6d5aff61c69f1720 (diff) | |
download | rails-2cc49df85a4b0232a804944caead6f288a20ad26.tar.gz rails-2cc49df85a4b0232a804944caead6f288a20ad26.tar.bz2 rails-2cc49df85a4b0232a804944caead6f288a20ad26.zip |
Add detailed error message to `IrreversibleMigration`
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/migration/command_recorder.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/migration/command_recorder.rb b/activerecord/lib/active_record/migration/command_recorder.rb index b52e89d792..ab5a4cad89 100644 --- a/activerecord/lib/active_record/migration/command_recorder.rb +++ b/activerecord/lib/active_record/migration/command_recorder.rb @@ -69,7 +69,7 @@ module ActiveRecord # invert the +command+. def inverse_of(command, args, &block) method = :"invert_#{command}" - raise IrreversibleMigration unless respond_to?(method, true) + raise IrreversibleMigration, "#{method} is not defined, so #{command} is not reversible" unless respond_to?(method, true) send(method, args, &block) end |