instance method
invert_rename_enum_value
Ruby on Rails edge
Since v7.1.6 Private — implementation detail, not part of the public APISignature
invert_rename_enum_value(args, kwargs)
No documentation comment.
Parameters
-
argsreq -
kwargsreq
Source
# File activerecord/lib/active_record/migration/command_recorder.rb, line 366
def invert_rename_enum_value(args, kwargs)
unless kwargs.has_key?(:from) && kwargs.has_key?(:to)
raise ActiveRecord::IrreversibleMigration, "rename_enum_value is only reversible if given a :from and :to option."
end
[:rename_enum_value, args, { from: kwargs[:to], to: kwargs[:from] }]
end
Defined in activerecord/lib/active_record/migration/command_recorder.rb line 366
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Migration::CommandRecorder