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

Version Path
SFEley-browsercms-3.0.2 app/controllers/cms/routes_controller.rb
buzzware-browsercms-3.0.2 app/controllers/cms/routes_controller.rb
coredumplings-browsercms-3.0.0 app/controllers/cms/routes_controller.rb
nate-browsercms-3.0.210 app/controllers/cms/routes_controller.rb
nate-browsercms-3.0.211 app/controllers/cms/routes_controller.rb
we5-browsercms-3.0.1.1 app/controllers/cms/routes_controller.rb
webficient-browsercms-3.0.1 app/controllers/cms/routes_controller.rb
webficient-browsercms-3.0.2 app/controllers/cms/routes_controller.rb
webficient-browsercms-3.0.3 app/controllers/cms/routes_controller.rb
webficient-browsercms-3.0.4 app/controllers/cms/routes_controller.rb
browsercms-3.1.5 app/controllers/cms/routes_controller.rb
browsercms-3.1.4 app/controllers/cms/routes_controller.rb
browsercms-3.1.3 app/controllers/cms/routes_controller.rb
bf4-browsercms-3.1.0 app/controllers/cms/routes_controller.rb
drujensen-browsercms-3.2.0 app/controllers/cms/routes_controller.rb
browsercmsi-3.1.2 app/controllers/cms/routes_controller.rb
browsercms-3.1.2 app/controllers/cms/routes_controller.rb
browsercms-3.1.1 app/controllers/cms/routes_controller.rb
browsercmsi-3.1.1 app/controllers/cms/routes_controller.rb
browsercmsi-3.1.0 app/controllers/cms/routes_controller.rb