Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Neatened up the invert_add_index method as per suggeston

  • Loading branch information...
commit 9934c97cae8f3016137419cfe27af06492c4f725 1 parent 54866b0
@workmad3 workmad3 authored tenderlove committed
Showing with 3 additions and 2 deletions.
  1. +3 −2 activerecord/lib/active_record/migration/command_recorder.rb
View
5 activerecord/lib/active_record/migration/command_recorder.rb
@@ -81,10 +81,11 @@ def invert_rename_column(args)
def invert_add_index(args)
table, columns, options = *args
if options && options[:name]
- [:remove_index, [table, {:name => options[:name]}]]
+ options_hash = {:name => options[:name]}
else
- [:remove_index, [table, {:column => columns}]]
+ options_hash = {:column => columns}
end
+ [:remove_index, [table, options_hash]]
end
def invert_remove_timestamps(args)

0 comments on commit 9934c97

Please sign in to comment.
Something went wrong with that request. Please try again.