2009/12/11 pankaj <[email protected]>:
> Hi,
> Lets assume we have an url, /controller1/action1.
> In the before filter, under certain conditions, I want to route it
> to /controller2/action2. without changing the url at the client side
> ie I donot want to use redirect. Please help.
>
class FooController < ApplicationController
before_filter :maybe_redirect
protected
def maybe_redirect
redirect_to your_url
false
end
end
--
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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.