Class: Cms::RoutesController
- Inherits:
-
BaseController
- Object
- ApplicationController
- ApplicationController
- BaseController
- Cms::RoutesController
- Defined in:
- app/controllers/cms/routes_controller.rb
Instance Method Summary collapse
Methods inherited from BaseController
Methods inherited from ApplicationController
Instance Method Details
#index ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'app/controllers/cms/routes_controller.rb', line 5 def index unless params[:path].blank? @path = params[:path] @route = Rails.application.routes.recognize_path(@path) end @routes = Rails.application.routes.routes.collect do |route| name = route.name.to_s verb = route.verb segs = route.path.spec reqs = route.requirements.empty? ? "" : route.requirements.inspect {:name => name, :verb => verb, :segs => segs, :reqs => reqs} end end |