876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
|
# File 'lib/active_record/migration.rb', line 876
def method_missing(method, *arguments, &block)
arg_list = arguments.map(&:inspect) * ", "
say_with_time "#{method}(#{arg_list})" do
unless connection.respond_to? :revert
unless arguments.empty? || [:execute, :enable_extension, :disable_extension].include?(method)
arguments[0] = proper_table_name(arguments.first, table_name_options)
if [:rename_table, :add_foreign_key].include?(method) ||
(method == :remove_foreign_key && !arguments.second.is_a?(Hash))
arguments[1] = proper_table_name(arguments.second, table_name_options)
end
end
end
return super unless connection.respond_to?(method)
connection.send(method, *arguments, &block)
end
end
|