application.rb 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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 += %W(#{config.root}/lib)
  16. # Only load the plugins named here, in the order given (default is alphabetical).
  17. # :all can be used as a placeholder for all plugins not explicitly named.
  18. # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
  19. # Activate observers that should always be running.
  20. # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
  21. config.active_record.observers =
  22. 'observer::_session',
  23. 'observer::_ticket::_first_response',
  24. 'observer::_ticket::_last_contact',
  25. 'observer::_ticket::_close_time',
  26. 'observer::_ticket::_user_ticket_counter',
  27. 'observer::_ticket::_article_counter',
  28. 'observer::_ticket::_article_sender_type',
  29. 'observer::_ticket::_article::_fillup_from_general',
  30. 'observer::_ticket::_article::_fillup_from_email',
  31. 'observer::_ticket::_article::_communicate_email',
  32. 'observer::_ticket::_article::_communicate_facebook',
  33. 'observer::_ticket::_article::_communicate_twitter',
  34. 'observer::_ticket::_notification',
  35. 'observer::_ticket::_reset_new_state',
  36. 'observer::_ticket::_escalation_calculation',
  37. 'observer::_ticket::_ref_object_touch',
  38. 'observer::_tag::_ticket_history',
  39. 'observer::_user::_geo'
  40. # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
  41. # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
  42. # config.i18n.default_locale = :de
  43. # Configure the default encoding used in templates for Ruby 1.9.
  44. config.encoding = "utf-8"
  45. # Configure sensitive parameters which will be filtered from the log file.
  46. config.filter_parameters += [:password]
  47. # Use SQL instead of Active Record's schema dumper when creating the database.
  48. # This is necessary if your schema can't be completely dumped by the schema dumper,
  49. # like if you have constraints or database-specific column types
  50. # config.active_record.schema_format = :sql
  51. # Enable the asset pipeline
  52. config.assets.enabled = true
  53. # Version of your assets, change this if you want to expire all your assets
  54. config.assets.version = '1.0'
  55. # Use a different cache store in production
  56. config.cache_store = :file_store, 'tmp/cache/file_store'
  57. # REST api path
  58. config.api_path = '/api/v1'
  59. end
  60. end