Sha256: 4fae6320f316d47f4edce77d84e8481f1d1afcc184e962cd23157392b28afefd
Contents?: true
Size: 523 Bytes
Versions: 11
Compression:
Stored size: 523 Bytes
Contents
module Cms class RoutesController < Cms::BaseController 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 end end
Version data entries
11 entries across 11 versions & 2 rubygems