Skip to content

Instantly share code, notes, and snippets.

@ericallam
Created August 23, 2010 19:58
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 ericallam/546208 to your computer and use it in GitHub Desktop.
Save ericallam/546208 to your computer and use it in GitHub Desktop.
@alt = ActionDispatch::Routing::RouteSet.new
@alt.draw do
controller :custom do
resources :tweets
end
end
def app
@alt
end
include Rack::Test::Methods
get '/tweets'
# => ActionController::RoutingError: uninitialized constant TweetsController
include @alt.url_helpers
hash_for_tweets_path
# => {:controller=>"tweets", :action=>"create", :use_route=>"tweets", :only_path=>true}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment