Sha256: 8874a09d1668474a03c7e711e773be4dc23903a63ceced5853b23185240503b4
Contents?: true
Size: 728 Bytes
Versions: 35
Compression:
Stored size: 728 Bytes
Contents
class Cms::RoutesController < Cms::BaseController def index @toolbar_tab = :administration unless params[:path].blank? @path = params[:path] @route = ActionController::Routing::Routes.recognize_path(@path) end @routes = ActionController::Routing::Routes.routes.collect do |route| name = ActionController::Routing::Routes.named_routes.routes.index(route).to_s verb = route.conditions[:method].to_s.upcase segs = route.segments.inject("") { |str,s| str << s.to_s } segs.chop! if segs.length > 1 reqs = route.requirements.empty? ? "" : route.requirements.inspect {:name => name, :verb => verb, :segs => segs, :reqs => reqs} end end end
Version data entries
35 entries across 35 versions & 11 rubygems