我遵循railscast生成复杂的表单
我收到这个错误:-
"Error: "throw $continue" is deprecated, use "return" instead"
任何想法?
当我试图添加一个新问题时,我收到这个错误。
From railscast:——
def link_to_add_fields(name, f, association)
new_object = f.object.class.reflect_on_association(association).klass.new
fields = f.fields_for(association, new_object, :child_index => "new_#{association}") do |builder|
render(association.to_s.singularize + "_fields", :f => builder)
end
link_to_function(name, h("add_fields(this, "#{association}", "#{escape_javascript(fields)}")"))
end
删除link_to_function ie中的h
def link_to_add_fields(name, f, association)
new_object = f.object.class.reflect_on_association(association).klass.new
fields = f.fields_for(association, new_object, :child_index => "new_#{association}") do |builder|
render(association.to_s.singularize + "_fields", :f => builder)
end
link_to_function(name, ("add_fields(this, "#{association}", "#{escape_javascript(fields)}")"))
end