brg
2010-Dec-03 11:06 UTC
undefined method `events'' for nil:NilClass when using accepts_nested_attributes_for
Thanks for helping. The errors occurs during implementation accepts_nested_attributes_for. I get ActionView::Template:Error (undefined method ''events'' for nil:class) & NoMethodError in app/views/ users/index.html.erb where line #12. See all files @ https://gist.github.com/726828 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Frederick Cheung
2010-Dec-03 15:14 UTC
Re: undefined method `events'' for nil:NilClass when using accepts_nested_attributes_for
On Dec 3, 11:06 am, brg <bauchir...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Thanks for helping. The errors occurs during implementation > accepts_nested_attributes_for. I get ActionView::Template:Error > (undefined method ''events'' for nil:class) & NoMethodError in app/views/ > users/index.html.erb where line #12. See all files @https://gist.github.com/726828Doesn''t look like anything to do with accepts_nested_attributes_for - doesn''t look like you''ve assigned anything to @user in the index action. Fred -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.