summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/application.rb2
-rw-r--r--config/environments/development.rb3
-rw-r--r--config/environments/production.rb1
-rw-r--r--config/environments/test.rb25
-rw-r--r--config/routes.rb20
5 files changed, 21 insertions, 30 deletions
diff --git a/config/application.rb b/config/application.rb
index cb92166..1a7f32b 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -56,6 +56,6 @@ module Cccms
56 config.i18n.default_locale = :de 56 config.i18n.default_locale = :de
57 57
58 config.filter_parameters += [:password, :password_confirmation] 58 config.filter_parameters += [:password, :password_confirmation]
59 config.serve_static_assets = true 59 config.serve_static_files = true
60 end 60 end
61end 61end
diff --git a/config/environments/development.rb b/config/environments/development.rb
index 94f216f..3813cab 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -17,5 +17,6 @@ Cccms::Application.configure do
17 config.action_mailer.raise_delivery_errors = false 17 config.action_mailer.raise_delivery_errors = false
18 18
19 config.active_support.deprecation = :log 19 config.active_support.deprecation = :log
20 config.serve_static_assets = true 20 config.serve_static_files = true
21 config.eager_load = false
21end 22end
diff --git a/config/environments/production.rb b/config/environments/production.rb
index 2f933de..6f2c5bd 100644
--- a/config/environments/production.rb
+++ b/config/environments/production.rb
@@ -13,6 +13,7 @@ Cccms::Application.configure do
13 config.log_level = :info 13 config.log_level = :info
14 14
15 config.active_support.deprecation = :notify 15 config.active_support.deprecation = :notify
16 config.eager_load = false
16 17
17 # Use a different logger for distributed setups 18 # Use a different logger for distributed setups
18 # config.logger = SyslogLogger.new 19 # config.logger = SyslogLogger.new
diff --git a/config/environments/test.rb b/config/environments/test.rb
index 728e147..3b2413e 100644
--- a/config/environments/test.rb
+++ b/config/environments/test.rb
@@ -1,32 +1,23 @@
1# Settings specified here will take precedence over those in config/environment.rb
2
3Cccms::Application.configure do 1Cccms::Application.configure do
4 2
5 # The test environment is used exclusively to run your application's
6 # test suite. You never need to work with it otherwise. Remember that
7 # your test database is "scratch space" for the test suite and is wiped
8 # and recreated between test runs. Don't rely on the data there!
9 config.cache_classes = true 3 config.cache_classes = true
10 4
11 # Log error messages when you accidentally call methods on nil. 5 # Log error messages when you accidentally call methods on nil.
12 config.whiny_nils = true 6 # config.whiny_nils = true # removed in Rails 4
13 7
14 # Show full error reports and disable caching
15 config.action_controller.consider_all_requests_local = true 8 config.action_controller.consider_all_requests_local = true
16 config.action_controller.perform_caching = false 9 config.action_controller.perform_caching = false
17 10
18 # Disable request forgery protection in test environment
19 config.action_controller.allow_forgery_protection = false 11 config.action_controller.allow_forgery_protection = false
20 12
21 # Tell Action Mailer not to deliver emails to the real world.
22 # The :test delivery method accumulates sent emails in the
23 # ActionMailer::Base.deliveries array.
24 config.action_mailer.delivery_method = :test 13 config.action_mailer.delivery_method = :test
25 14
26 # Use SQL instead of Active Record's schema dumper when creating the test database. 15 config.active_support.deprecation = :log
27 # This is necessary if your schema can't be completely dumped by the schema dumper, 16 config.active_support.test_order = :sorted
28 # like if you have constraints or database-specific column types 17
29 # config.active_record.schema_format = :sql 18 config.active_record.raise_in_transactional_callbacks = true
30 19
31 config.active_support.deprecation = :raise 20 config.eager_load = false
21 config.serve_static_files = true
22 config.static_cache_control = "public, max-age=3600"
32end 23end
diff --git a/config/routes.rb b/config/routes.rb
index 5e3eb3f..4a440c1 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -31,10 +31,11 @@ Cccms::Application.routes.draw do
31 end 31 end
32 end 32 end
33 33
34 match '/logout' => 'sessions#destroy', :as => :logout 34 match '/logout' => 'sessions#destroy', :as => :logout, :via => :delete
35 match '/login' => 'sessions#new', :as => :login 35 match '/login' => 'sessions#new', :as => :login, :via => :get
36 match 'admin/search' => 'admin#search', :as => :admin_search 36 match 'admin' => 'admin#index', :as => :admin, :via => :get
37 match 'search' => 'search#index', :as => :search 37 match 'admin/search' => 'admin#search', :as => :admin_search, :via => :get
38 match 'search' => 'search#index', :as => :search, :via => :get
38 39
39 resources :users 40 resources :users
40 41
@@ -46,12 +47,9 @@ Cccms::Application.routes.draw do
46 47
47 resource :session 48 resource :session
48 49
49 match 'rss/:action' => 'rss#index', :as => :rss 50 match 'rss/:action' => 'rss#index', :as => :rss, :via => [:get, :post]
50 match 'rss/:action.:format' => 'rss#index' 51 match 'rss/:action.:format' => 'rss#index', :via => [:get, :post]
51 52
52 match '/:controller(/:action(/:id))' 53 match 'galleries/*page_path' => 'content#render_gallery', :via => :get
53 match '/:controller(/:action(/:id.:format))' 54 match '/*page_path' => 'content#render_page', :as => :content, :via => :get
54
55 match 'galleries/*page_path' => 'content#render_gallery'
56 match '/*page_path' => 'content#render_page', :as => :content
57end 55end