Module: Resources::Routes
Instance Method Summary collapse
- #current_path ⇒ Object
- #current_route ⇒ Object
- #named_routes ⇒ Object
- #path_parameters ⇒ Object
- #router ⇒ Object
- #routes ⇒ Object
Instance Method Details
#current_path ⇒ Object
28 29 30 |
# File 'lib/resources/routes.rb', line 28 def current_path recognize_path(request.path) end |
#current_route ⇒ Object
24 25 26 |
# File 'lib/resources/routes.rb', line 24 def current_route recognize_route(request) end |
#named_routes ⇒ Object
12 13 14 |
# File 'lib/resources/routes.rb', line 12 def named_routes routes.named_routes end |
#path_parameters ⇒ Object
20 21 22 |
# File 'lib/resources/routes.rb', line 20 def path_parameters request.env['action_dispatch.request.path_parameters'].symbolize_keys end |
#router ⇒ Object
16 17 18 |
# File 'lib/resources/routes.rb', line 16 def router routes.router end |
#routes ⇒ Object
8 9 10 |
# File 'lib/resources/routes.rb', line 8 def routes Rails.application.routes || request.env['action_dispatch.routes'] end |