application.rb 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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::_tag::_ticket_history',
  38. 'observer::_user::_geo'
  39. # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
  40. # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
  41. # config.i18n.default_locale = :de
  42. # Configure the default encoding used in templates for Ruby 1.9.
  43. config.encoding = "utf-8"
  44. # Configure sensitive parameters which will be filtered from the log file.
  45. config.filter_parameters += [:password]
  46. # Use SQL instead of Active Record's schema dumper when creating the database.
  47. # This is necessary if your schema can't be completely dumped by the schema dumper,
  48. # like if you have constraints or database-specific column types
  49. # config.active_record.schema_format = :sql
  50. # Enable the asset pipeline
  51. config.assets.enabled = true
  52. # Version of your assets, change this if you want to expire all your assets
  53. config.assets.version = '1.0'
  54. # Use a different cache store in production
  55. config.cache_store = :file_store, 'tmp/cache/file_store'
  56. # REST api path
  57. config.api_path = '/api/v1'
  58. end
  59. end