提交 e5a60fb2 编写于 作者: J Jeremy Kemper

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
上级 c9bfd7d5
......@@ -285,7 +285,8 @@ def move_table(from, to, options = {}, &block) #:nodoc:
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] ||
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册