Displaying 20 results from an estimated 90000 matches similar to: "Why redirect_to "/blog""
2007 Oct 04
0
redirect_to and flash[:notice] issue
Hi,
I''m looking for a way to get messages that I put into flash[:notice]
to be accessible on a different view/different action from where I am
populating it. In one action, I am putting messages into the hash,
and then at the end I use redirect_to to load up a new action/view. I
would like the messages that I have put into flash[:notice] to appear
on this redirected to view, but it
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 Jun 21
0
problem with redirect_to() and VirtualHost
I''m running into a problem with redirect_to() and Apache''s
VirtualHost facility. I have probably have something set up
wrong, but I''m not even sure how to approach the problem.
Background:
We have DNS set up to return the domain''s address for all
sub-domains. So, "dig xyz.cfcl.com" returns the same IP
address as "dig cfcl.com".
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
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
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
2009 Jan 28
4
format.html and redirect_to
I was wondering what the purpose of wrapping a redirect_to in a
format.html block is. I get why you''d want to do this with a render,
but if you''re redirecting the browser to another URL, what''s the
point? As I understand it, when redirect_to is called, Rails sends a
302 back to the browser, so I''m having trouble understanding why
format plays any part in this.
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
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 Jan 27
0
redirect_to(:action => ...) usage?
I''ve a number of places in my rails application where I have
redirects, but I find they are not always redirected. I think
part of the problem is that my understanding of pre-requisites
is insufficient. I''m not sure how to frame a search to get the
answer I need. I''m using Rails 0.14.3 under cygwin with ruby 1.8.2
How do I make sure that data received in @params[] on
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
2006 Dec 01
0
You are being redirected message
Ticket #3082 details a fix to add a body to redirect pages. This seems like
an old patch, but only now is it biting me. I have an authentication scheme
like this:
class ApplicationController < ActionController::Base
before_filter :check_authentication, :except => [:signin]
def check_authentication
return true if session[:user]
session[:return_to] = request.request_uri if
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 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 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
2006 Aug 17
0
redirect_to POST?
Is it possible to automatically direct someone to a POST? Whenever a
user comes to my site, I''m automatically creating a user in the DB for
that person, however I''m also trying to stick to REST principles
otherwise. My idea was to have a before_filter :check_user that checked
to see whether this user existed or redirected to a POST users_url() to
automatically create the
2006 Oct 09
1
How can I go back to where I was?
How can I make a user go back to where he was after doing something with
a post.
For example, let''s assume that the user clicked a post in a third page,
and after doing something (reply, destroy and so on) with the post it
just redirect to the list.
But at this time, the user always go back to the first page because of
"redirect_to :action => ''list''"
Is
2006 Feb 07
0
redirect_to and complex values
Guys,
I have a number of actions that need to redirect to the user (as opposed
to render) to an action so that a refresh won''t report the data.
However, these actions also need to pass a hash to the targeted actions
in the redirect.
Trying to do this with redirect_to paramters converts the Hash to a
String, which won''t work for me. For example:
2008 Dec 03
2
Render and/or redirect were called multiple times in this action
I''m trying to add an application enabled/disabled flag in my
application.. This is my code.
[code=] # application.rb
...
before_filter :check_enabled_flag
private
def check_enabled_flag
application_flag = ApplicationFlag.find(:first)
if application_flag.application_enabled
redirect_to application_disabled_path and return
end
end[/code]
and for some reason