71 lines
2.8 KiB
Ruby
71 lines
2.8 KiB
Ruby
require File.expand_path('../boot', __FILE__)
|
|
require 'rails/all'
|
|
|
|
Bundler.require(:default, :assets, Rails.env) if defined?(Bundler)
|
|
|
|
module Nineminutes
|
|
class Application < Rails::Application
|
|
config.autoload_once_paths += %W(#{config.root}/lib)
|
|
|
|
# enable caching in development mode
|
|
config.action_controller.perform_caching = true
|
|
config.action_controller.page_cache_directory = Rails.root.to_s+"/public/cache/"
|
|
|
|
# asset packaging
|
|
config.serve_static_assets = true
|
|
|
|
# Only load the plugins named here, in the order given (default is alphabetical).
|
|
# :all can be used as a placeholder for all plugins not explicitly named.
|
|
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
|
|
|
# Activate observers that should always be running.
|
|
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
|
|
|
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
|
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
|
config.time_zone = 'Vienna'
|
|
config.active_record.default_timezone = :local
|
|
|
|
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
|
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
|
# config.i18n.default_locale = 'de-AT'
|
|
# config.i18n.available_locales = 'de-AT'
|
|
|
|
# Configure the default encoding used in templates for Ruby 1.9.
|
|
config.encoding = "utf-8"
|
|
|
|
# Configure sensitive parameters which will be filtered from the log file.
|
|
config.filter_parameters += [:password]
|
|
|
|
# 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
|
|
|
|
# Version of your assets, change this if you want to expire all your assets
|
|
config.assets.version = '1.0'
|
|
|
|
config.assets.initialize_on_precompile = false
|
|
|
|
# precompile all assets that don't start with an underscore '_'
|
|
# so we don't have to list all of them here. This is similar to
|
|
# the view layer where files with '_' are partials which are only
|
|
# included in other files.
|
|
# idea taken from: https://github.com/rails/rails/issues/3094
|
|
config.assets.precompile = [ /
|
|
^ # Start of path
|
|
((.*?)\/)? # Any directories
|
|
(?!_) # Leading underscore
|
|
[^\/]* # Everything else
|
|
$ # End of path
|
|
/x ]
|
|
|
|
# Defaults to '/assets'
|
|
# config.assets.prefix = '/asset-files'
|
|
end
|
|
end
|