Class: ActionDispatch::Routing::Mapper
- Inherits:
-
Object
- Object
- ActionDispatch::Routing::Mapper
- Defined in:
- lib/form_journey/routes.rb
Instance Method Summary collapse
Instance Method Details
#mount_journey(path, controller) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/form_journey/routes.rb', line 5 def mount_journey(path, controller) resource "#{path}", only: [] do get "/", controller: controller, action: :default_step get "/:id/edit", controller: controller, action: 'edit', as: 'edit' yield if block_given? match "/:action", controller: controller, action: /[a-z0-9_]+/, via: [:get, :post, :patch, :delete], as: 'step' end end |