1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Don't implicitly assign instance variables by using them as block arguments

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7691 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Jeremy Kemper 2007-09-30 06:22:39 +00:00
parent c9bfd7d543
commit e5a60fb2bf

View file

@ -285,7 +285,8 @@ module ActiveRecord
def copy_table(from, to, options = {}) #:nodoc:
options = options.merge(:id => !columns(from).detect{|c| c.name == 'id'}.nil?)
create_table(to, options) do |@definition|
create_table(to, options) do |definition|
@definition = definition
columns(from).each do |column|
column_name = options[:rename] ?
(options[:rename][column.name] ||