added config option for including of default routes
Olli Huotari
committed Feb 12, 2012
commit cd991ad0c573a6f879ec0f969af506a86f8a8dfe
Showing 2
changed files with
7 additions
and 2 deletions
config/routes.rb
+1
-1
| @@ | @@ -39,6 +39,6 @@ Rails.application.routes.draw do |
| :constraints => {:format => /xml/}, | |
| :format => :xml | |
| get '/' => :render_html, :as => 'cms_html', :path => "(*cms_path)" | |
| - | end |
| + | end if ComfortableMexicanSofa.config.include_default_routes |
| end | |
comfortable_mexican_sofa/configuration.rb b/lib/comfortable_mexican_sofa/configuration.rb
+6
-1
| @@ | @@ -18,7 +18,11 @@ class ComfortableMexicanSofa::Configuration |
| # When arriving at /cms-admin you may chose to redirect to arbirtary path, | |
| # for example '/cms-admin/users' | |
| attr_accessor :admin_route_redirect | |
| - | |
| + | |
| + | # Normally we include default routes from https://github.com/comfy/comfortable-mexican-sofa/blob/master/config/routes.rb |
| + | # If you want to include the routes manually set this to false |
| + | attr_accessor :include_default_routes |
| + | |
| # Not allowing irb code to be run inside page content. False by default. | |
| attr_accessor :allow_irb | |
| @@ | @@ -57,6 +61,7 @@ class ComfortableMexicanSofa::Configuration |
| @seed_data_path = nil | |
| @admin_route_prefix = 'cms-admin' | |
| @admin_route_redirect = '' | |
| + | @include_default_routes = true |
| @allow_irb = false | |
| @upload_file_options = { :url => '/system/:class/:id/:attachment/:style/:filename' } | |
| @enable_fixtures = false | |