diff options
author | yui-knk <spiketeika@gmail.com> | 2015-08-28 19:17:06 +0900 |
---|---|---|
committer | yui-knk <spiketeika@gmail.com> | 2015-08-28 19:17:06 +0900 |
commit | f13d31c37c93cabdb61c1de010af6ad134e2ec6f (patch) | |
tree | 415b4e2f1c2781f1492feabd658c903b36907173 /activerecord/lib | |
parent | 2cc49df85a4b0232a804944caead6f288a20ad26 (diff) | |
download | rails-f13d31c37c93cabdb61c1de010af6ad134e2ec6f.tar.gz rails-f13d31c37c93cabdb61c1de010af6ad134e2ec6f.tar.bz2 rails-f13d31c37c93cabdb61c1de010af6ad134e2ec6f.zip |
Add detailed error message to `IrreversibleMigration`
Diffstat (limited to 'activerecord/lib')
-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 ab5a4cad89..6a0539e938 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, "#{method} is not defined, so #{command} is not reversible" unless respond_to?(method, true) + raise IrreversibleMigration, "This migration uses #{command} that is not automatically reversible, please define down method" unless respond_to?(method, true) send(method, args, &block) end |