Commit 380faf7e76161ce59a423754b482567f607a666f
1 parent
4fca4d2b
Exists in
master
and in
20 other branches
rails4: upgrade initialization
Showing
5 changed files
with
10 additions
and
14 deletions
Show diff stats
config/application.rb
@@ -8,12 +8,7 @@ require 'active_support/dependencies' | @@ -8,12 +8,7 @@ require 'active_support/dependencies' | ||
8 | # to work for now, but we should really look at putting those plugins away. | 8 | # to work for now, but we should really look at putting those plugins away. |
9 | ActiveSupport::Deprecation.silenced = true | 9 | ActiveSupport::Deprecation.silenced = true |
10 | 10 | ||
11 | -if defined?(Bundler) | ||
12 | - # If you precompile assets before deploying to production, use this line | ||
13 | - Bundler.require(*Rails.groups(:assets => %w(development test))) | ||
14 | - # If you want your assets lazily compiled in production, use this line | ||
15 | - # Bundler.require(:default, :assets, Rails.env) | ||
16 | -end | 11 | +Bundler.require(:default, :assets, Rails.env) |
17 | 12 | ||
18 | module Noosfero | 13 | module Noosfero |
19 | class Application < Rails::Application | 14 | class Application < Rails::Application |
@@ -100,6 +95,8 @@ module Noosfero | @@ -100,6 +95,8 @@ module Noosfero | ||
100 | # no precedence over core | 95 | # no precedence over core |
101 | Dir.glob("app/assets/designs/{icons,themes,user_themes}/*") | 96 | Dir.glob("app/assets/designs/{icons,themes,user_themes}/*") |
102 | 97 | ||
98 | + # disable strong_parameters before migration from protected_attributes | ||
99 | + config.action_controller.permit_all_parameters = true | ||
103 | # Version of your assets, change this if you want to expire all your assets | 100 | # Version of your assets, change this if you want to expire all your assets |
104 | config.assets.version = '1.0' | 101 | config.assets.version = '1.0' |
105 | 102 |
config/environments/cucumber.rb
@@ -7,10 +7,9 @@ Noosfero::Application.configure do | @@ -7,10 +7,9 @@ Noosfero::Application.configure do | ||
7 | # For more information see https://rspec.lighthouseapp.com/projects/16211/tickets/165 | 7 | # For more information see https://rspec.lighthouseapp.com/projects/16211/tickets/165 |
8 | config.cache_classes = true | 8 | config.cache_classes = true |
9 | 9 | ||
10 | - config.active_support.deprecation = :log | 10 | + config.eager_load = false |
11 | 11 | ||
12 | - # Log error messages when you accidentally call methods on nil. | ||
13 | - config.whiny_nils = true | 12 | + config.active_support.deprecation = :log |
14 | 13 | ||
15 | # Show full error reports and disable caching | 14 | # Show full error reports and disable caching |
16 | config.action_controller.perform_caching = false | 15 | config.action_controller.perform_caching = false |
config/environments/development.rb
@@ -6,8 +6,7 @@ Noosfero::Application.configure do | @@ -6,8 +6,7 @@ Noosfero::Application.configure do | ||
6 | # since you don't have to restart the webserver when you make code changes. | 6 | # since you don't have to restart the webserver when you make code changes. |
7 | config.cache_classes = false | 7 | config.cache_classes = false |
8 | 8 | ||
9 | - # Log error messages when you accidentally call methods on nil. | ||
10 | - config.whiny_nils = true | 9 | + config.eager_load = false |
11 | 10 | ||
12 | # Show full error reports and disable caching | 11 | # Show full error reports and disable caching |
13 | config.action_controller.perform_caching = false | 12 | config.action_controller.perform_caching = false |
config/environments/production.rb
@@ -5,6 +5,8 @@ Noosfero::Application.configure do | @@ -5,6 +5,8 @@ Noosfero::Application.configure do | ||
5 | # Code is not reloaded between requests | 5 | # Code is not reloaded between requests |
6 | config.cache_classes = true | 6 | config.cache_classes = true |
7 | 7 | ||
8 | + config.eager_load = true | ||
9 | + | ||
8 | # Full error reports are disabled and caching is turned on | 10 | # Full error reports are disabled and caching is turned on |
9 | # config.action_controller.perform_caching = true | 11 | # config.action_controller.perform_caching = true |
10 | 12 |
config/environments/test.rb
@@ -7,13 +7,12 @@ Noosfero::Application.configure do | @@ -7,13 +7,12 @@ Noosfero::Application.configure do | ||
7 | # and recreated between test runs. Don't rely on the data there! | 7 | # and recreated between test runs. Don't rely on the data there! |
8 | config.cache_classes = true | 8 | config.cache_classes = true |
9 | 9 | ||
10 | + config.eager_load = false | ||
11 | + | ||
10 | # Configure static asset server for tests with Cache-Control for performance | 12 | # Configure static asset server for tests with Cache-Control for performance |
11 | config.serve_static_assets = true | 13 | config.serve_static_assets = true |
12 | config.static_cache_control = "public, max-age=3600" | 14 | config.static_cache_control = "public, max-age=3600" |
13 | 15 | ||
14 | - # Log error messages when you accidentally call methods on nil | ||
15 | - config.whiny_nils = true | ||
16 | - | ||
17 | # Show full error reports and disable caching | 16 | # Show full error reports and disable caching |
18 | config.action_controller.perform_caching = false | 17 | config.action_controller.perform_caching = false |
19 | 18 |