Skip to content

Instantly share code, notes, and snippets.

@jbodah
Created August 6, 2014 18:13
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 jbodah/420a2ed6e746b7c0308f to your computer and use it in GitHub Desktop.
Save jbodah/420a2ed6e746b7c0308f to your computer and use it in GitHub Desktop.
Dynamically add controller routes
setup do
# Setup a route for our fake controller
Rails.application.routes.draw do
get "/readonlymodetest/foo" => "DOMAIN/read_only_mode_test#foo"
get "/readonlymodetest/foo_with_write" => "DOMAIN/read_only_mode_test#foo_with_write"
root :to => 'pages#show', :id => 'home'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment