some config changes for rails 4 found on the Internet

This commit is contained in:
Devin Howard 2015-09-10 17:43:58 +08:00
parent 5848af7765
commit 3c0bdff823
4 changed files with 7 additions and 26 deletions

View file

@ -44,14 +44,7 @@ module Metamaps
# like if you have constraints or database-specific column types
# config.active_record.schema_format = :sql
# Enforce whitelist mode for mass assignment.
# This will create an empty whitelist of attributes available for mass-assignment for all models
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
# parameters by using an attr_accessible or attr_protected declaration.
# config.active_record.whitelist_attributes = true
# Enable the asset pipeline
config.assets.enabled = true
config.assets.initialize_on_precompile = false
# Version of your assets, change this if you want to expire all your assets

View file

@ -1,14 +1,13 @@
Metamaps::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
config.eager_load = false
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the web server when you make code changes.
config.cache_classes = false
# Log error messages when you accidentally call methods on nil.
config.whiny_nils = true
# Show full error reports and disable caching
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
@ -40,16 +39,6 @@ Metamaps::Application.configure do
# Print deprecation notices to the Rails logger
config.active_support.deprecation = :log
# Only use best-standards-support built into browsers
config.action_dispatch.best_standards_support = :builtin
# Raise exception on mass assignment protection for Active Record models
config.active_record.mass_assignment_sanitizer = :strict
# Log the query plan for queries taking more than this (works
# with SQLite, MySQL, and PostgreSQL)
config.active_record.auto_explain_threshold_in_seconds = 0.5
# Do not compress assets
config.assets.compress = false

View file

@ -1,6 +1,9 @@
Metamaps::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
config.eager_load = true
config.assets.js_compressor = :uglifier
# Code is not reloaded between requests
config.cache_classes = true

View file

@ -1,6 +1,8 @@
Metamaps::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
config.eager_load = false
# The test environment is used exclusively to run your application's
# test suite. You never need to work with it otherwise. Remember that
# your test database is "scratch space" for the test suite and is wiped
@ -11,9 +13,6 @@ Metamaps::Application.configure do
config.serve_static_assets = true
config.static_cache_control = "public, max-age=3600"
# Log error messages when you accidentally call methods on nil
config.whiny_nils = true
# Show full error reports and disable caching
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
@ -29,9 +28,6 @@ Metamaps::Application.configure do
# ActionMailer::Base.deliveries array.
config.action_mailer.delivery_method = :test
# Raise exception on mass assignment protection for Active Record models
config.active_record.mass_assignment_sanitizer = :strict
# Print deprecation notices to the stderr
config.active_support.deprecation = :stderr
end