1 class RedirectSpecController < ApplicationController
3 def action_with_no_redirect
4 render :text => "this is just here to keep this from causing a MissingTemplate error"
7 def action_with_redirect_to_somewhere
8 redirect_to :action => 'somewhere'
11 def action_with_redirect_to_other_somewhere
12 redirect_to :controller => 'render_spec', :action => 'text_action'
15 def action_with_redirect_to_somewhere_and_return
16 redirect_to :action => 'somewhere' and return
17 render :text => "this is after the return"
21 render :text => "this is just here to keep this from causing a MissingTemplate error"
24 def action_with_redirect_to_rspec_site
25 redirect_to "http://rspec.rubyforge.org"
28 def action_with_redirect_back
32 def action_with_redirect_in_respond_to
34 wants.html { redirect_to :action => 'somewhere' }
38 def action_with_redirect_which_creates_query_string
39 redirect_to :action => "somewhere", :id => 1111, :param1 => "value1", :param2 => "value2"
42 # note: sometimes this is the URL which rails will generate from the hash in
43 # action_with_redirect_which_creates_query_string
44 def action_with_redirect_with_query_string_order1
45 redirect_to "http://test.host/redirect_spec/somewhere/1111?param1=value1¶m2=value2"
48 # note: sometimes this is the URL which rails will generate from the hash in
49 # action_with_redirect_which_creates_query_string
50 def action_with_redirect_with_query_string_order2
51 redirect_to "http://test.host/redirect_spec/somewhere/1111?param2=value2¶m1=value1"
54 def action_with_redirect_to_unroutable_url_inside_app
55 redirect_to :controller => "nonexistant", :action => "none"