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:
parent
c9bfd7d543
commit
e5a60fb2bf
1 changed files with 2 additions and 1 deletions
|
@ -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] ||
|
||||
|
|
Loading…
Reference in a new issue