Method: ActiveRecord::Migration::CommandRecorder#record
- Defined in:
- activerecord/lib/active_record/migration/command_recorder.rb
#record(*command, &block) ⇒ Object
Record command. command should be a method name and arguments. For example:
recorder.record(:method_name, [:arg1, :arg2])
90 91 92 93 94 95 96 |
# File 'activerecord/lib/active_record/migration/command_recorder.rb', line 90 def record(*command, &block) if @reverting @commands << inverse_of(*command, &block) else @commands << (command << block) end end |