Sha256: 83eb3d03dd4dc066012df74a0f71967000c551bc92fc27f3d76ae731a59f008f
Contents?: true
Size: 573 Bytes
Versions: 21
Compression:
Stored size: 573 Bytes
Contents
class CMS::Routes < SimpleDelegator def draw namespace :cms do get 'description' => 'root#description' get '' => 'root#index' CMS::Configuration.types.each do |type| resources type.model_name.route_key end yield if block_given? end CMS::Configuration.pages.each do |page| if page.editable? get page.route => 'cms/pages#show', page: page.action, as: "cms_#{page.action}" else get page.route => 'cms/pages#static_page', page: page.action, as: "cms_#{page.action}" end end end end
Version data entries
21 entries across 21 versions & 1 rubygems