Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nested attributes and haml engine #35

Open
bl4d3 opened this issue Jun 6, 2011 · 0 comments
Open

nested attributes and haml engine #35

bl4d3 opened this issue Jun 6, 2011 · 0 comments

Comments

@bl4d3
Copy link

bl4d3 commented Jun 6, 2011

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant