-
-
Save bsodmike/1228809 to your computer and use it in GitHub Desktop.
Another approach to dynamically defining application routes in Rails engine
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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