mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
updating documentation
This commit is contained in:
parent
96b50a0392
commit
0d7410faab
1 changed files with 7 additions and 1 deletions
|
@ -18,7 +18,13 @@ module ActiveRecord
|
|||
end
|
||||
|
||||
# Returns a list that represents commands that are the inverse of the
|
||||
# commands stored in +commands+.
|
||||
# commands stored in +commands+. For example:
|
||||
#
|
||||
# recorder.record(:rename_table, [:old, :new])
|
||||
# recorder.inverse # => [:rename_table, [:new, :old]]
|
||||
#
|
||||
# This method will raise an IrreversibleMigration exception if it cannot
|
||||
# invert the +commands+.
|
||||
def inverse
|
||||
@commands.reverse.map { |name, args|
|
||||
method = :"invert_#{name}"
|
||||
|
|
Loading…
Reference in a new issue