application.rb 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. require File.expand_path('../boot', __FILE__)
  2. require 'rails/all'
  3. if defined?(Bundler)
  4. # If you precompile assets before deploying to production, use this line
  5. Bundler.require(*Rails.groups(:assets => %w(development test)))
  6. # If you want your assets lazily compiled in production, use this line
  7. # Bundler.require(:default, :assets, Rails.env)
  8. end
  9. module Zammad
  10. class Application < Rails::Application
  11. # Settings in config/environments/* take precedence over those specified here.
  12. # Application configuration should go into files in config/initializers
  13. # -- all .rb files in that directory are automatically loaded.
  14. # Custom directories with classes and modules you want to be autoloadable.
  15. config.autoload_paths += Dir["#{config.root}/lib/**/"]
  16. # config.autoload_paths += %W(#{config.root}/lib)
  17. # Only load the plugins named here, in the order given (default is alphabetical).
  18. # :all can be used as a placeholder for all plugins not explicitly named.
  19. # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
  20. # Activate observers that should always be running.
  21. # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
  22. config.active_record.observers =
  23. 'observer::_session',
  24. 'observer::_history',
  25. 'observer::_ticket::_first_response',
  26. 'observer::_ticket::_last_contact',
  27. 'observer::_ticket::_close_time',
  28. 'observer::_ticket::_user_ticket_counter',
  29. 'observer::_ticket::_article_counter',
  30. 'observer::_ticket::_article_sender_type',
  31. 'observer::_ticket::_article::_fillup_from_general',
  32. 'observer::_ticket::_article::_fillup_from_email',
  33. 'observer::_ticket::_article::_communicate_email',
  34. 'observer::_ticket::_article::_communicate_facebook',
  35. 'observer::_ticket::_article::_communicate_twitter',
  36. 'observer::_ticket::_notification',
  37. 'observer::_ticket::_reset_new_state',
  38. 'observer::_ticket::_escalation_calculation',
  39. 'observer::_tag::_ticket_history',
  40. 'observer::_user::_geo'
  41. # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
  42. # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
  43. # config.i18n.default_locale = :de
  44. # Configure the default encoding used in templates for Ruby 1.9.
  45. config.encoding = "utf-8"
  46. # Configure sensitive parameters which will be filtered from the log file.
  47. config.filter_parameters += [:password]
  48. # Use SQL instead of Active Record's schema dumper when creating the database.
  49. # This is necessary if your schema can't be completely dumped by the schema dumper,
  50. # like if you have constraints or database-specific column types
  51. # config.active_record.schema_format = :sql
  52. # Enforce whitelist mode for mass assignment.
  53. # This will create an empty whitelist of attributes available for mass-assignment for all models
  54. # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
  55. # parameters by using an attr_accessible or attr_protected declaration.
  56. # config.active_record.whitelist_attributes = true
  57. # Enable the asset pipeline
  58. config.assets.enabled = true
  59. # Version of your assets, change this if you want to expire all your assets
  60. config.assets.version = '1.0'
  61. # Use a different cache store in production
  62. config.cache_store = :file_store, 'tmp/cache/file_store'
  63. # REST api path
  64. config.api_path = '/api/v1'
  65. # Enable threaded mode
  66. config.threadsafe!
  67. # catch all router files
  68. config.paths['config/routes'] += Dir[Rails.root.join("config/routes/*.rb")]
  69. end
  70. end