lib/cms/routes.rb in honey-cms-0.2.4 vs lib/cms/routes.rb in honey-cms-0.3.0
- old
+ new
@@ -10,9 +10,13 @@
yield if block_given?
end
CMS::Configuration.pages.each do |page|
- get page => "cms/pages#show", page: page.dup, as: "cms_#{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