search for: redirect_url

Displaying 7 results from an estimated 7 matches for "redirect_url".

2006 May 31
2
calling routing during a functional test
...uestion. I am testing the create action on my controller. I wanted to fetch the ID parameter of the newly created object, so that I can make some assertions on it. But I can''t seem to find an elegant way of doing that. Of course, might create action redirects. That means that @response.redirect_url is something like "/show/8". So I could pluck the number off that, but that seems too brittle, since if I change my routing, that would no longer work. I was wondering if there was a way to call routing on the redirect_url, so that I could then fetch the ID from the parameters hash....
2010 Jan 31
3
Append/Prepend to a template from controller method
...I can''t call render twice w/o getting a double render error, so is this possible? I want to redirect after a delay using a meta refresh. Here''s what I''ve got: app/controllers/application_controller.rb: def redirect_after_delay (url, delay) @redirect_delay = delay @redirect_url = url render end app/views/layouts/application.html.erb <!DOCTYPE html> <html lang="en"> <head> <%= yield :refresh_tag %> </head> <body> <%= yield %> </body> </html> So then if I want to add a redirect-after-delay...
2007 Feb 01
3
should_redirect_to in rspec-0.8.0 / rspec_on_rails 1453
...#39;'joe at shmoe.com'', :full_name => ''Joe Schmoe''} assigns[:user].should_not_be_nil assigns[:user].new_record?.should_not_be(true) flash[:notice].should_match(/user added/) response.should_be_redirect puts "redirecting to #{response.redirect_url}" puts "this response was #{response.redirect?}" controller.should_redirect_to ''http://test.host/user'' end the puts statements output the following: redirecting to http://test.host/user this response was true Any idea why this line: controller.shoul...
2007 Jun 01
1
redirect_to a relative path
In a controller spec, doing something like: response.redirect_url.should == omglolsrofls_path ... fails, as so: expected "/omglolrofls", got "http://test.host/omglolrofls" (using ==) You can see that the http://test.host is prepended to the path. My controller is indeed redirecting to the omglolrofls path, and not the url. Is this expected...
2007 May 21
4
Spec''ing redirect with arbitrary parameters
I''ve got the following expectation: response.should redirect_to(:action => "new", :video_id => "1", :process_id => "2", :origin_id => "3") that fails with this error message: expected redirect to {:video_id=>"1", :process_id=>"2", :origin_id=>"3", :action=>"new"}, got redirect to
2008 Oct 13
10
Shibboleth
Can anyone direct me to a really good tutorial on Shibboleth integration with Rails, or indeed some sample code? I''ve been tearing my hair out all day on this one. Thanks RobL --~--~---------~--~----~------------~-------~--~----~ 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
2008 May 19
6
Sample Code, quick simple openid auth
...== ''1'' # start doing the auth here begin oid_request = OpenID::Consumer.new(@state, nil).begin(input.openid_identity) oid_request.return_to_args[''finish''] = ''1'' redirect(oid_request.redirect_url(''http:'' + URL(''/'').to_s, this_url)) rescue OpenID::DiscoveryFailure return ''Couldn\''t find an OpenID at that address, are you sure it is one?'' end else # finish the auth here...