RailsCasts Pro episodes are now free!

Learn more or hide this

andiruleu's Profile

GitHub User: andiruleu

Comments by

Avatar

I think this is wrong, it has changed but it gives error using your syntax.

Avatar

+1 for nested resources! I'm having trouble commenting though. When I tried create a new comment in something like users/1/nested/12/comments/new

I get redirected to

nested/12/comments and users/1/ disappears

and then I get error saying

undefined method `classify' for nil:NilClass

in my CommentsController#create

How do I solve this issue?

Avatar
ruby
commented on <%= link_to activity.trackable.recipe.name, activity.trackable.recipe %>

For this code, How come I get error undefined method, I'm not using the exact names for my values, I'm doing it this way,

ruby
commented on <%= link_to activity.trackable.list.name, activity.trackable %>

but I'm not sure why I don't have to add a .list at the end of my code? Instead I can just stop at .trackable