radhames brito wrote: > oh , i forgot you are doing polymorphic associations sorry, > > > redirect_to polymorphic_path(@commentable) > > > remember to catch @commentable with the find_commentable method > > you can find it iterating the params hash or user a context_Type in the > route , i like that last one more.
Do you know if there is anyway for my find_commentable method to treat a comment the same way as an article? So, when a user tries to reply to a comment, the URL looks like this: http://localhost:3000/comments/new?in_reply_to=56 When a user replies to an article (or profile), it looks like this: http://localhost:3000/articles/304 The find_commentable way only works for the second method URL, since it cannot find a commentable in the first one. Sorry, this is my first Rails application, so my code is very cluttered, and I don't think I thought everything through the first time. Here's my comments controller: http://gist.github.com/585167 -- Posted via http://www.ruby-forum.com/. -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

