diff --git a/config/application.rb b/config/application.rb index ca12037..97e2da3 100644 --- a/config/application.rb +++ b/config/application.rb @@ -14,10 +14,35 @@ module Nineminutes # 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 @@ -26,6 +51,19 @@ module Nineminutes 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