Skip to content

Instantly share code, notes, and snippets.

@aweis
Created May 10, 2015 00:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aweis/85ce138c5d9a777df87e to your computer and use it in GitHub Desktop.
Save aweis/85ce138c5d9a777df87e to your computer and use it in GitHub Desktop.
url_for bad route...
routes.rb
namespace :manage do
resources :dashboard, :only => [] do
collection do
get 'index'
end
end
end
match '/manage', :controller => 'manage/dashboard', :action => 'index'
in a controller
def redirect_to_something
url_for({"controller"=>"manage/dashboard", "action"=>"index"}) # this is really url_for(request.params)
# expected => test.host/manage
# got => test.host
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment