application.rb 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. require File.expand_path('../boot', __FILE__)
  2. require 'rails/all'
  3. Bundler.require(:default, Rails.env)
  4. Dotenv.overload File.expand_path('../../spec/env.test', __FILE__) if Rails.env.test?
  5. module Huginn
  6. class Application < Rails::Application
  7. # Settings in config/environments/* take precedence over those specified here.
  8. # Application configuration should go into files in config/initializers
  9. # -- all .rb files in that directory are automatically loaded.
  10. # Custom directories with classes and modules you want to be autoloadable.
  11. config.autoload_paths += %W(#{config.root}/lib)
  12. # Activate observers that should always be running.
  13. # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
  14. # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
  15. # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
  16. config.time_zone = ENV['TIMEZONE'].present? ? ENV['TIMEZONE'] : "Pacific Time (US & Canada)"
  17. # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
  18. # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
  19. # config.i18n.default_locale = :de
  20. # Configure the default encoding used in templates for Ruby 1.9.
  21. config.encoding = "utf-8"
  22. # Configure sensitive parameters which will be filtered from the log file.
  23. config.filter_parameters += [:password]
  24. # Enable escaping HTML in JSON.
  25. config.active_support.escape_html_entities_in_json = true
  26. # Use SQL instead of Active Record's schema dumper when creating the database.
  27. # This is necessary if your schema can't be completely dumped by the schema dumper,
  28. # like if you have constraints or database-specific column types
  29. # config.active_record.schema_format = :sql
  30. # Enforce whitelist mode for mass assignment.
  31. # This will create an empty whitelist of attributes available for mass-assignment for all models
  32. # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
  33. # parameters by using an attr_accessible or attr_protected declaration.
  34. config.active_record.whitelist_attributes = true
  35. # Enable the asset pipeline
  36. config.assets.enabled = true
  37. config.assets.initialize_on_precompile = false
  38. end
  39. end