Skip to content

Instantly share code, notes, and snippets.

@bsodmike
Forked from workmad3/gist:1228805
Created September 20, 2011 10:24
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 bsodmike/1228809 to your computer and use it in GitHub Desktop.
Save bsodmike/1228809 to your computer and use it in GitHub Desktop.
Another approach to dynamically defining application routes in Rails engine
module ActionDispatch::Routing
class Mapper
def engine_routing
#define your routes here. You can use all the normal route DSL stuff
resources :dashboard
end
end
end
module OilChange
class Engine < Rails::Engine
end
end
module ActionDispatch::Routing
class Mapper
def your_routing
#define your routes here. You can use all the normal route DSL stuff
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment