Skip to content

Commit

Permalink
Old settings commented and new added closes apigy#103
Browse files Browse the repository at this point in the history
Some warnings are generated when migrating the rails 3 to 4 rails and
file "config /" are not updated

With these changes the mode of development on bulletin out.

Signed-off-by: Thiago Ribeiro <thiagitosouza@hotmail.com>
  • Loading branch information
thiagovsk committed Mar 6, 2015
1 parent 740075f commit 3860fa4
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 6 deletions.
11 changes: 8 additions & 3 deletions config/application.rb
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
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
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

0 comments on commit 3860fa4

Please sign in to comment.