We use a catch-all route in SomeController that incorrectly catch
redirects to external websites when we use the 'redirect_to' method.
Any help on how to avoid that is greatly appreciated.

This is our routes:

resources :some_controller, :path => '/' do
collection do
get 'go_to_external'
end
end


This is an action that does a redirect to an external website:

class SomeController < ApplicationController


def go_to_external
#should not be caught by the some_controller route, but is caught by
it.
redirect_to "https://example.com", :status => :found

end
end


Best,
Andy

--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedOct 1, '11 at 2:33p
activeOct 1, '11 at 2:33p
posts1
users1
websiterubyonrails.org
irc#RubyOnRails

1 user in discussion

Andy S: 1 post

People

Translate

site design / logo © 2022 Grokbase