application.rb revision 1f7679641dd7de4244482c939c6388814eba86c5
58N/A # If you precompile assets before deploying to production, use this line 58N/A # If you want your assets lazily compiled in production, use this line 58N/A # -- all .rb files in that directory are automatically loaded. 58N/A # Custom directories with classes and modules you want to be autoloadable. 1186N/A # Mailer Layout for Devise https://github.com/plataformatec/devise/issues/1671 1186N/A config.to_prepare { Devise::Mailer.layout "mailer" } 1281N/A # Only load the plugins named here, in the order given (default is alphabetical). 1330N/A # :all can be used as a placeholder for all plugins not explicitly named. 1330N/A # config.plugins = [ :exception_notification, :ssl_requirement, :all ] 1330N/A # Activate observers that should always be running. 1330N/A # config.active_record.observers = :cacher, :garbage_collector, :forum_observer 1330N/A # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. 1186N/A # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. 1186N/A # config.time_zone = 'Central Time (US & Canada)' 1186N/A # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. 1186N/A # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] 1281N/A # config.i18n.default_locale = :de 1281N/A # Configure the default encoding used in templates for Ruby 1.9. 1186N/A # Configure sensitive parameters which will be filtered from the log file. 1281N/A config.filter_parameters += [:password] 1281N/A # Use SQL instead of Active Record's schema dumper when creating the database. 1186N/A # This is necessary if your schema can't be completely dumped by the schema dumper, 1186N/A # like if you have constraints or database-specific column types 1186N/A config.active_record.schema_format = :sql 1281N/A # Enforce whitelist mode for mass assignment. 1281N/A # This will create an empty whitelist of attributes available for mass-assignment for all models 1186N/A # in your app. As such, your models will need to explicitly whitelist or blacklist accessible 1186N/A # parameters by using an attr_accessible or attr_protected declaration. 1186N/A config.active_record.whitelist_attributes = true 1186N/A # Enable the asset pipeline 1186N/A config.assets.enabled = true 1186N/A # Version of your assets, change this if you want to expire all your assets 1186N/A config.assets.version = '1.0' 1186N/A config.i18n.enforce_available_locales = true # Including Jstree Themes Styles in Precompiling config.assets.precompile += %w(jstree-themes/**/*) #Including the external mappings Yaml-file config.external_url_mapping = APP_CONFIG = YAML.load(File.read(Rails.root + "config/external_link_mapping.yml")) config.before_initialize do local_environment_config = config.root.join('config', 'environments', require local_environment_config if File.exists?(local_environment_config) RailsConfig.overwrite_arrays = true Settings.add_source!(Rails.root.join('config', 'hets.yml').to_s) # Enable serving of images, stylesheets, and JavaScripts from an asset server config.action_controller.asset_host = Settings.asset_host require config.root.join('config', 'initializers', 'hostname.rb') Settings.action_mailer[:default_url_options] ||= {} Settings.action_mailer[:default_url_options] = Settings.action_mailer[:default_url_options].to_hash Settings.action_mailer[:default_url_options][:host] ||= config.fqdn Settings.action_mailer[:default_url_options][:port] ||= config.port Settings.action_mailer.each do |key, value| config.action_mailer.send("#{key}=", value) config.after_initialize do SettingsValidator.new.validate! SettingsInterpreter.new.call Sidekiq::Logging.logger.level = Kernel.const_get("Logger::#{Settings.asynchronous_execution.log_level}")