Open bl4d3 opened 13 years ago
Hi, I was working with nested attributes (something like this http://railscasts.com/episodes/197-nested-model-form-part-2) and I had this error
undefined method `reflect_on_association' for NilClass:Class
I generated haml template with amazing gem but I figured out that into a generic new.html.haml a symbol is used into the form and this generate the error up here on this line
= link_to_add_fields "Add Zone", f, :zones
= form_for :company, :url => companies_path, :html => { :class => :form } do |f| = render :partial => "form", :locals => {:f => f}
so I used this
= form_for @company, :url => companies_path, :html => { :class => :form } do |f|
and it works fine.
Hi, I was working with nested attributes (something like this http://railscasts.com/episodes/197-nested-model-form-part-2) and I had this error
undefined method `reflect_on_association' for NilClass:Class
I generated haml template with amazing gem but I figured out that into a generic new.html.haml a symbol is used into the form and this generate the error up here on this line
= link_to_add_fields "Add Zone", f, :zones
so I used this
and it works fine.