development.rb 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. Rails.application.configure do
  3. # Settings specified here will take precedence over those in config/application.rb.
  4. # In the development environment your application's code is reloaded on
  5. # every request. This slows down response time but is perfect for development
  6. # since you don't have to restart the web server when you make code changes.
  7. config.enable_reloading = true
  8. # Do not eager load code on boot.
  9. config.eager_load = false
  10. # Show full error reports.
  11. config.consider_all_requests_local = true
  12. # Enable/disable caching. By default caching is disabled.
  13. # Run rails dev:cache to toggle caching.
  14. if Rails.root.join('tmp/caching-dev.txt').exist?
  15. config.action_controller.perform_caching = true
  16. # config.action_controller.enable_fragment_cache_logging = true
  17. config.public_file_server.headers = {
  18. 'Cache-Control' => "public, max-age=#{2.days.to_i}"
  19. }
  20. else
  21. config.action_controller.perform_caching = false
  22. end
  23. # Store uploaded files on the local file system (see config/storage.yml for options).
  24. # config.active_storage.service = :local
  25. # Don't care if the mailer can't send.
  26. config.action_mailer.raise_delivery_errors = false
  27. config.action_mailer.perform_caching = false
  28. # Print deprecation notices to the Rails logger.
  29. config.active_support.deprecation = :log
  30. # Raise an error on page load if there are pending migrations.
  31. config.active_record.migration_error = :page_load
  32. # Highlight code that triggered database queries in logs.
  33. config.active_record.verbose_query_logs = true
  34. # Debug mode disables concatenation and preprocessing of assets.
  35. # This option may cause significant delays in view rendering with a large
  36. # number of complex assets.
  37. config.assets.debug = false
  38. # Suppress logger output for asset requests.
  39. config.assets.quiet = true
  40. # Use an evented file watcher to asynchronously detect changes in source code,
  41. # routes, locales, etc. This feature depends on the listen gem.
  42. config.file_watcher = if ENV['DEVELOPMENT_FILE_WATCHER'] == 'file_update_checker'
  43. ActiveSupport::FileUpdateChecker
  44. else
  45. ActiveSupport::EventedFileUpdateChecker
  46. end
  47. # Asset digests allow you to set far-future HTTP expiration dates on all assets,
  48. # yet still be able to expire them through the digest params.
  49. config.assets.digest = false
  50. # Adds additional error checking when serving assets at runtime.
  51. # Checks for improperly declared sprockets dependencies.
  52. # Raises helpful error messages.
  53. config.assets.raise_runtime_errors = true
  54. # TODO: New in Rails 6
  55. # See https://www.fngtps.com/2019/rails6-blocked-host/
  56. config.hosts.clear
  57. # Set log level via environment variable, defaults to debug
  58. config.log_level = ENV.fetch('RAILS_DEVELOPMENT_LOG_LEVEL', 'debug')
  59. # Enable server timing headers
  60. config.server_timing = true
  61. end