Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comment old configurations and new configurations. #104

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,23 @@
end

module Selfstarter

class Application < Rails::Application

# --- Standard Rails Config ---
config.time_zone = 'Pacific Time (US & Canada)'
config.encoding = "utf-8"
config.filter_parameters += [:password]
config.active_record.whitelist_attributes = true

#DEPRECATION WARNING: Model based mass assignment security has been extracted
#out of Rails into a gem. Please use the new recommended protection model for
#params or add `protected_attributes` to your Gemfile to use the old one.
#config.active_record.whitelist_attributes = true

# Enable the asset pipeline
config.assets.enabled = true
# Version of your assets, change this if you want to expire all your assets
config.assets.version = '1.0'
# --- Standard Rails Config ---
end
end
end
29 changes: 26 additions & 3 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
config.cache_classes = false

# Log error messages when you accidentally call methods on nil.
config.whiny_nils = true
#config.whiny_nils = true
#DEPRECATION WARNING: config.whiny_nils option is deprecated and no longer works.

# Do not eager load code on boot.
config.eager_load = false

# Show full error reports and disable caching
config.consider_all_requests_local = true
Expand All @@ -16,22 +20,41 @@
# Don't care if the mailer can't send
config.action_mailer.raise_delivery_errors = false

# Adds additional error checking when serving assets at runtime.
# Checks for improperly declared sprockets dependencies.
# Raises helpful error messages.
config.assets.raise_runtime_errors = true

# Print deprecation notices to the Rails logger
config.active_support.deprecation = :log

# Raise an error on page load if there are pending migrations.
config.active_record.migration_error = :page_load

# 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
#config.active_record.mass_assignment_sanitizer = :strict
#DEPRECATION WARNING: Model based mass assignment security has been extracted
#out of Rails into a gem. Please use the new recommended protection model for
#params or add `protected_attributes` to your Gemfile to use the old one.

# 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
#config.active_record.auto_explain_threshold_in_seconds = 0.5
#DEPRECATION WARNING: The Active Record auto explain feature has been removed.

# Do not compress assets
config.assets.compress = false

# Expands the lines which load the assets
config.assets.debug = true

# Asset digests allow you to set far-future HTTP expiration dates on all assets,
# yet still be able to expire them through the digest params.
config.assets.digest = true

# Raises error for missing translations
# config.action_view.raise_on_missing_translations = true
end
3 changes: 3 additions & 0 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
# Generate digests for assets URLs
config.assets.digest = true

#Rails 4 upgrade
config.eager_load = true
config.assets.js_compressor = :uglifier
# Defaults to nil and saved in location specified by config.assets.prefix
# config.assets.manifest = YOUR_PATH

Expand Down