2009-01-17 18:18:42 +00:00
|
|
|
class FakeModel
|
|
|
|
def id
|
|
|
|
nil
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2008-12-29 06:30:26 +00:00
|
|
|
class WebratController < ApplicationController
|
2008-12-30 04:14:26 +00:00
|
|
|
|
2008-12-29 06:30:26 +00:00
|
|
|
def form
|
|
|
|
end
|
2008-12-30 04:14:26 +00:00
|
|
|
|
2008-12-29 06:30:26 +00:00
|
|
|
def submit
|
2009-01-14 04:33:47 +00:00
|
|
|
render :text => "OK <a href='/' id='link_id'>Test Link Text</a>"
|
2008-12-29 06:30:26 +00:00
|
|
|
end
|
2009-04-08 00:30:12 +00:00
|
|
|
|
2009-01-05 04:56:52 +00:00
|
|
|
def internal_redirect
|
2009-01-19 18:56:22 +00:00
|
|
|
redirect_to submit_path
|
2008-12-30 04:14:26 +00:00
|
|
|
end
|
2009-04-08 00:30:12 +00:00
|
|
|
|
2009-02-09 01:54:00 +00:00
|
|
|
def infinite_redirect
|
|
|
|
redirect_to infinite_redirect_path
|
|
|
|
end
|
2009-04-08 00:30:12 +00:00
|
|
|
|
2009-01-05 04:56:52 +00:00
|
|
|
def external_redirect
|
|
|
|
redirect_to "http://google.com"
|
|
|
|
end
|
2008-12-30 04:14:26 +00:00
|
|
|
|
2009-04-25 06:49:11 +00:00
|
|
|
def host_redirect
|
|
|
|
redirect_to submit_url
|
|
|
|
end
|
|
|
|
|
2009-01-19 18:56:22 +00:00
|
|
|
def before_redirect_form
|
|
|
|
end
|
2009-04-08 00:30:12 +00:00
|
|
|
|
2009-01-19 18:56:22 +00:00
|
|
|
def redirect_to_show_params
|
|
|
|
redirect_to show_params_path(:custom_param => "123")
|
|
|
|
end
|
2009-04-08 00:30:12 +00:00
|
|
|
|
2009-01-19 18:56:22 +00:00
|
|
|
def show_params
|
|
|
|
render :text => params.to_json
|
|
|
|
end
|
2009-04-08 00:30:12 +00:00
|
|
|
|
2009-09-18 15:28:07 +00:00
|
|
|
def within
|
|
|
|
end
|
|
|
|
|
2009-04-08 00:30:12 +00:00
|
|
|
end
|