application.rb 2.2 KB

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