Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

undefined method `reflect_on_association' for NilClass:Class #196

Closed
arun057 opened this issue Sep 17, 2012 · 2 comments
Closed

undefined method `reflect_on_association' for NilClass:Class #196

arun057 opened this issue Sep 17, 2012 · 2 comments

Comments

@arun057
Copy link

arun057 commented Sep 17, 2012

I am trying to do a 4 level deeply nested form, but plugin fails at the second level of nesting.
for example,

Course -> Lessons -> Sections -> Assets
plugin works for lessons when only that is using the link_to_add helper.

when I add it to Sections, and Assets it fails with

  undefined method `reflect_on_association' for NilClass:Class

at

  <%= render 'asset_fields', f: asset_builder %>
  <% end %>
  <br/>
  <%= f.link_to_add "Add Asset", :assets %>
  </fieldset>
@lest
Copy link
Collaborator

lest commented Sep 17, 2012

Could you please push a test application reproducing this issue? Thanks!

@arun057
Copy link
Author

arun057 commented Sep 19, 2012

Looks like it was my fault, I had a belongs to , :through on my asset model (dunno why the dev server didnt throw any error though :( )

@arun057 arun057 closed this as completed Sep 19, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants