aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-11-18 15:15:03 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2010-11-19 10:24:16 -0800
commit0d7410faabaafc6cd64f636b22a450faedc732ca (patch)
tree5e4fa226746aadef9160c26bdaf2bf825ca6b80c
parent96b50a039276b4391ddf07b0a74850ce7bad6863 (diff)
downloadrails-0d7410faabaafc6cd64f636b22a450faedc732ca.tar.gz
rails-0d7410faabaafc6cd64f636b22a450faedc732ca.tar.bz2
rails-0d7410faabaafc6cd64f636b22a450faedc732ca.zip
updating documentation
-rw-r--r--activerecord/lib/active_record/migration/command_recorder.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/migration/command_recorder.rb b/activerecord/lib/active_record/migration/command_recorder.rb
index 87ad603c04..8a98a177d5 100644
--- a/activerecord/lib/active_record/migration/command_recorder.rb
+++ b/activerecord/lib/active_record/migration/command_recorder.rb
@@ -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}"