try this? def create # ... redirect_to request.env['HTTP_REFERER'] # ...
On Sep 17, 4:22 pm, Kelp Kelp <[email protected]> wrote: > radhames brito wrote: > > just put > > > redirect_to :back > > > at the end of the create > > Hi, > When I try that with a threaded comment, it runs into an error: > Cannot redirect to nil! > > I am using a polymorphic association for my articles,profiles and > comments. My comments controller marks the articles and profiles as > commentable, but I have to take a different approach when it comes to my > comments. > -- > Posted viahttp://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.

