Skip to content
Browse files

Flatten the list of columns given to create_index

  • Loading branch information...
1 parent 6bb8882 commit 82ca327b28c55177b5495d41a6d5ba3743410911 Paul Sadauskas committed Sep 29, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/migration.rb
View
2 lib/migration.rb
@@ -104,7 +104,7 @@ def create_index(table_name, *columns_and_options)
else
opts = {}
end
- columns = columns_and_options
+ columns = columns_and_options.flatten
opts[:name] ||= "#{opts[:unique] ? 'unique_' : ''}index_#{table_name}_#{columns.join('_')}"

0 comments on commit 82ca327

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