Class: ActionDispatch::Routing::Mapper
- Inherits:
-
Object
- Object
- ActionDispatch::Routing::Mapper
- Defined in:
- lib/transit/rails/routing.rb
Instance Method Summary collapse
Instance Method Details
#transit(*args) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/transit/rails/routing.rb', line 4 def transit(*args) = args. Transit::Engine.routes.draw do args.map(&:to_s).map(&:pluralize).each do |mod| Transit.add_mapping(mod) resources mod do resources :contexts end end end mount Transit::Engine => ([:mount_on] || "/transit") end |