similar to: format.html and redirect_to

Displaying 20 results from an estimated 30000 matches similar to: "format.html and redirect_to"

2006 Apr 03
3
render :partial + redirect_to :controller
This is of course disallowed, which I discovered only after nearly completing my spanking new ajaxified UI. What is the motivation behind this, and what is the best workaround? This UI does a scriptaculous drag-and-drop of items from a first div (div1) over to a second div (div2), which triggers the contents of div2 to be updated to reflect the drop. No prob, thus far. But then the
2006 Mar 24
6
login forms , redirect_to and ajax-scaffold problems
Hi, I have a standard type authentication technique direct from AWDWR, so there is a before_filter :authorize_employee, :except => :login in my employees_controller.rb the authorize_employee is in application.rb def authorize_employee unless session[:employee_id] flash[:notice] = "Please log in" # save the URL the user requested so we can hop
2008 Feb 28
2
redirect_to or render
Hey, a newbie here. Can someone please give me a brief explanation whats the difference between the redirect_to method and the render method and when should I use one instead of the other ? thnx alot ! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send
2011 Feb 06
2
Difference in redirect_to behaviour (Firefox, IE 7)
Hi, Using Rails 3.0.3 on Ubuntu 10. In my application controller I have a before filter which checks where or not a User has some comment records. If no comment records our found, a redirection is issued to the main page. All my rspec/cucumber tests passed. So I thought start the server and see what happens when I use Firefox (3.6) or Internet Explorer (1.7) Scenario: Firefox User navigates
2007 Oct 26
15
Adding see_other method to ActionController
303 (See Other) is the status code a resource returns to tell the client about the new resource it just created (typically after a POST). 301/302 is the status code some servers return to tell the browser where to go next. It works because browsers ignore the distinction and treat all three status codes the same way, and few people understand the difference. But when developing an application
2006 Mar 30
1
flash, before_filter and redirect_to
I leave a notice in the flash and do a redirect from a before_filter. Can someone confirm that the first request after this, i.e. the page I redirect to, doesn''t/isn''t supposed to clear the flash? -- View this message in context: http://www.nabble.com/flash%2C-before_filter-and-redirect_to-t1367103.html#a3665933 Sent from the RubyOnRails Users forum at Nabble.com.
2006 Feb 13
1
Change redirect after method ''redirect_to''
I want to be able to change the redirection url after I called redirect_to, is that possible? My specific use case is that I want to change the default redirection of "Login Engine" method signup, but I am seeing no other way then copy/past and change the parameters of redirect_to. This questions extends to render method as well, I want is to avoid DoubleRenderError exception. --
2006 Jan 30
5
Action Mailer woes
Hi gang, Im having my first stab at ActionMailer and not having any luck. Perhaps someone could help me out. I generated a a mailer called ItemMailer - its purpose is to take some information that I''ve already gathered in a ToDo list form and to mail it out to the person who is nominated for the task In environment.rb I have; ActionMailer::Base.server_settings = { :address =>
2007 May 03
3
0.9.2 redirect_to no longer accepts hash?
Why am I now getting these errors? expected redirect to {:action=>"index"}, got redirect to "http://test.host/authenticated_users" I know in the AuthenticatedUsersController, the redirect call is redirect_to :action => ''index'' So why should I have to convert this to a url in my specs?
2008 Jan 23
4
redirect_to broken?
Is ActionController''s redirect_to method broken by Facebooker? When I try to invoke it and execute through apps.facebook.com, I get a blank page returned, response code 200, no redirect. When I try to connect directly to the server (not through apps.fb), I get the infinite recursion error described minutes ago. Are any of you able to use redirect_to successfully, and if so, any ideas
2006 Jul 22
2
redirect_to error
Hi, I have a redirect_to statement in a method that I would like to have at the end of the method to take you to a ''Success'' page if everything works. When I hit the redirect_to statement, ( redirect_to :action => ''show_success'' ) I get this in the browser: Application error Rails application failed to start properly" The development.log
2007 Aug 15
4
nuby: how spec redirect_to at ApplicationController
Good morning rspec people! Still rspec nuby: I must do something wrong obviously. How can I spec about redirect_to at ApplicationController describe ApplicationController do it "method login_required should redirect to home path without login" do pending "I tried to use controller.login_required.should be_redirected and got NoMethodError with nil object
2006 Dec 30
1
redirect_to(:action => ''foo'') and return
I''m not sure why this is happening, but if I do this in a controller unless @variation && @variation.quantity > 0 flash[:error] = "Sorry, that product is currently not available." redirect_to(:action => ''error'') and return end rspec tells me 2) ActionController::DoubleRenderError in ''The Carts controller with an
2008 Jul 01
8
redirect_to not working
Hi... I have a basic authentication system. I have a RESTful resource called session with the following code when logging in: def new end def create user = User.authenticate(params[:username], params[:password]) respond_to do |format| if user session[:user_id] = user.id flash[:notice] = "Welcome back #{user.name}!" format.html {redirect_to
2006 Jan 16
1
redirect_to is not working with ajax forms
I''m having trouble using redirect_to in an action called by a remote_form_tag. The log shows the redirect, and rendering of the redirected page, but the browser won''t redirect. If I set :update in the form_remote_tag, the page that was supposed to be redirected to will replace the :update elements content, and crash FF1.5 Running edge rails, and utf8 encoding joshua
2007 Apr 02
2
redirect_to an uncertain hash
I am trying to deal with a redirection based upon what to do after a session has expired. I take the params hash and stuff it into a new session as part of the new login and then after login, I want to redirect to this hash as though they were params again... Thus I start by setting session[:direct_to] = @params And after I login, I want to redirect based upon the values in
2007 Jul 26
6
response.should_not redirect_to
Hey, May be it is just too deep night over here and I''m missing something though I got this failure on {{{response.should_not redirect_to}}}: ''QueuesController should allow authenticated user to access ''show'''' FAILED Matcher does not support should_not. See Spec::Matchers for more information about matchers. Also I''ve found this in
2007 Jul 24
2
Nested params and redirect_to
I have a simple client search screen that posts the following params: Parameters: {"search"=>"Search", "action"=>"list", "client_search"=>{"first_name"=>"jane", last_name"=>"smith"}, "controller"=>"client"} This works fine. However I want to redirect to the same
2008 Feb 02
3
Question abt redirect_to..
I found a reference to using attachment_fu and followed the lead of it but having an issue with the redirect_to that renders the fb:render tag - In my form I''m setting the canvas to false, file is being uploaded / save fine but when I attempt to redirect: redirect_to :action => :new, :canvas => true Unfortunatly it looks like my callback URL is getting printed twice, e.g.
2006 Feb 02
1
redirect_to response code?
hi, I wanted to make some redirects from my old page urls to my new ones. In order to make google see the pages have moved permanently, I have to send a 301 moved permanently code to google. when I use redirect_to it sends a 302 moved temp. code. Can I change this behaviour? Thanks in advance.