module Resources::Routes
Public Instance Methods
current_path()
click to toggle source
# File lib/resources/routes.rb, line 28 def current_path recognize_path(request.path) end
current_route()
click to toggle source
# File lib/resources/routes.rb, line 24 def current_route recognize_route(request) end
named_routes()
click to toggle source
# File lib/resources/routes.rb, line 12 def named_routes routes.named_routes end
path_parameters()
click to toggle source
# File lib/resources/routes.rb, line 20 def path_parameters request.env['action_dispatch.request.path_parameters'].symbolize_keys end
router()
click to toggle source
# File lib/resources/routes.rb, line 16 def router routes.router end
routes()
click to toggle source
# File lib/resources/routes.rb, line 8 def routes Rails.application.routes || request.env['action_dispatch.routes'] end
Protected Instance Methods
recognize_path(path)
click to toggle source
# File lib/resources/routes.rb, line 36 def recognize_path(path) routes.recognize_path(path) end
recognize_route(request)
click to toggle source
# File lib/resources/routes.rb, line 40 def recognize_route(request) router.recognize(request) do |route, matches, params| return route end end