Closed
Description
I have a model:
class Parent < ActiveRecord::Base
has_many :children
end
And a form:
form do |f|
f.inputs do
f.has_many :children do |child_f|
child_f.input :name
child_f.input :_destroy, :as => :boolean, :label => "Remove" unless child_f.object.new_record?
end
end
end
When the form is loaded, I get the error:
undefined method `+' for nil:NilClass
However, if that unless
line is moved to any other position in the block, no error shows up and everything works just fine.
Metadata
Metadata
Assignees
Labels
No labels