ruby-on-railsrubyruby-on-rails-3ruby-on-rails-3.1

Redirect One Controller to another Controller


I have two controllers users & movies. All, I want to do, redirect from user#something to movie#something. is it possible??


Solution

  • Yes. Look at redirect_to. http://api.rubyonrails.org/classes/ActionController/Redirecting.html#method-i-redirect_to