similar to: can''t use symbols in redirect_to?

Displaying 20 results from an estimated 60000 matches similar to: "can''t use symbols in redirect_to?"

2006 Aug 17
2
validates_associated bug?
i seem to be experiencing a bug where rails tells me that my organization object''s associated credit card is invalid (activerecord validation-wise invalid), when i know it to be valid. this happens only if i tell the organization to validate_associated :credit_card. i know the associated credit card is valid, because a) that credit_card object itself throws no validation errors, and b)
2007 Aug 10
1
Can''t get should redirect_to match to work
Folks, I''ve posted to the simple example I''m working with as well as the spec code and results here: http://pastie.caboo.se/86750 I can''t seem to get this to work. Any ideas? Thanks, Scott -- View this message in context: http://www.nabble.com/Can%27t-get-should-redirect_to-match-to-work-tf4251891.html#a12101072 Sent from the rspec-users mailing list archive at
2006 Aug 03
1
Why doesn''t redirect_to handle rjs?
Is there a good reason why redirect_to doesn''t check responds_to, so it can handle redirects in rjs calls? I''ve done something like this in my app controller, seems to work ok... alias_method :redirect_to_orig, :redirect_to; def redirect_to(options = {}, *parameters_for_method_reference) respond_to do |accepts| accepts.html do redirect_to_orig
2006 Jul 03
0
REST vs. render vs. redirect_to w.r.t. create error messages, efficiency and the desired URL
Hi, Something has been bothering me for a long time and I''d like to know what other think about this common situation with Rails. Someone is looking at http://example.com/user/new where there is a form that POSTs the data to the user/create action. The controller might look like def new @user = User.new end def create @user = User.new(params[:entry]) if @user.save
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
2006 May 01
2
Can I send a redirect_to() call to a periodically_call_remote() function?...
Hi, I''m using Rails 1.1 and the periodically_call_remote() helper to query the server for the progress of a long running action. I''m using the excellent new RJS partials to send a page.replace_html() to update the status information on the page--which works very well. When the action completes I''m also trying to send a redirect_to() by the same approach--which
2006 May 01
1
Can I send a redirect_to() call to a periodically_call_remote() refresh?
Hi, I''m using Rails 1.1 and the periodically_call_remote() helper to query the server for the progress of a long running action. I''m using the excellent new RJS partials to send a page.replace_html() to update the status information on the page--which works very well. When the action completes I''m also trying to send a redirect_to() by the same approach--which
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 Nov 08
2
SystemStackError from redirect_to
Hi I''ve got a straightforward piece of code in my controller which will consistently produce a SystemStackError. @newmessage = @message.reply(params[:newmessage]) return unless request.post? if @newmessage.save flash[:notice] = "Message Sent" redirect_to :index end The error is occuring on the redirect_to line, if I comment that line out then everything behaves as it
2006 Mar 13
1
issue with redirect_to
Hi all: I can''t make redirect_to to unlock the current iframe using {:TARGET => "_top"}. It always stays in the current frame. I checked the redirect_to code, it seems the method does not use "target". here is the source code of redirect_to from ActionController::Base def redirect_to(options = {}, *parameters_for_method_reference) #:doc: 753: case options
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
2012 Jan 19
4
redirect_to with a hash instead of parameters
All, I have numerous places in my codebase like this: redirect_to :action => ''schedule_by_uid_and_run_date'', :uid => @schedule.first.train_uid, :year => @date.year, :month => @date.month, :day => @date.day I''d like to replace the :year, :month and :day parameters with a hash containing the three parameters. @date is an instance of a Date class,
2006 Jan 18
5
redirect_to with an anchor, how ?
Hello, I try this : redirect_to :action => ''infos'' , :id => params[:id] , :show => "comments#a" i want this : .../infos/15?show=comments#a but I have this : .../infos/15?show=comments%23a Someone could tell me how generate an anchor link ? Thanks
2006 May 12
0
redirect_to with hash vs string and docs
Hi, When I use redirect_to with a string (eg. redirect_to "http://www.yahoo.com"), the browser is sent a response with a header containing status 302. This is good for what I am doing. If I use redirect_to with a hash (eg. redirect_to :action=>''list''), the browser is sent a response with status 200 and the body contains the destination of the redirection. This
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 Mar 16
3
undefined method `redirect_to'
Hi all. I''m getting the following error in my app: undefined method `redirect_to'' for ActionController::Base:Class I''m using Windows 2000, Rails 2.0.2 and resource_controller (from James Golick). My controller: class CommentsController < ApplicationController include ResourceController::Controller belongs_to :post, :article, :photo create do
2006 Mar 17
0
Returning from Ajax call - "redirect_to error"
I have Ajax commenting on my site, well, I''m trying to get it working. It worked fine locally, but when I posted to the server, I''m getting an "Application Error (Rails)", and I checked the logs, and it has: (stack trace too deep) /usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/base.rb:447:in `url_for''
2012 Aug 01
2
'redirect_to' taking infinite loop.
Hi, The following controller method taking me into infinite loop. Once the update action completes I want to reload the ''index'' page. May I know why it is going into infinite loop? def update Device.find_by_id( params[:device_id] ).driver = ( params[:driver_id] == 0 ) ? nil : Driver.find_by_id( params[:driver_id] ) redirect_to :action => :index, :tab =>
2007 Jul 18
3
Getting the session variables after a redirect_to
Hi! I set some session variables on a login_controller and i want to access them after a redirect_to (:controller => "auditor", action => "check"). The problem is that the session variable are comming empty in the auditor view!! I tough that session variables last trought all controllers...iam wrong? Please tell me. -- Posted via http://www.ruby-forum.com/.
2006 Mar 30
4
redirect_to("url") with post?
Is there a Rails-friendly way to redirect_to an url and post some parameters with that? I''ve tried: redirect_to("http://whatever.com", { ''postme'' => ''this'' }) redirect_to("http://whatever.com", :post => { ''postme'' => ''this'' }) redirect_to("http://whatever.com", :options