development.rb 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. require "active_support/core_ext/integer/time"
  2. Rails.application.configure do
  3. # Settings specified here will take precedence over those in config/application.rb.
  4. # Make code changes take effect immediately without server restart.
  5. config.enable_reloading = true
  6. # Do not eager load code on boot.
  7. config.eager_load = false
  8. # Show full error reports.
  9. config.consider_all_requests_local = true
  10. # Enable server timing.
  11. config.server_timing = true
  12. # Enable/disable Action Controller caching. By default Action Controller caching is disabled.
  13. # Run rails dev:cache to toggle Action Controller 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 = { "cache-control" => "public, max-age=#{2.days.to_i}" }
  18. else
  19. config.action_controller.perform_caching = false
  20. end
  21. # Change to :null_store to avoid any caching.
  22. config.cache_store = :memory_store
  23. # Print deprecation notices to the Rails logger.
  24. config.active_support.deprecation = :log
  25. # Raise an error on page load if there are pending migrations.
  26. config.active_record.migration_error = :page_load
  27. # Highlight code that triggered database queries in logs.
  28. config.active_record.verbose_query_logs = true
  29. # Append comments with runtime information tags to SQL queries in logs.
  30. config.active_record.query_log_tags_enabled = true
  31. # Raises error for missing translations.
  32. # config.i18n.raise_on_missing_translations = true
  33. # Annotate rendered view with file names.
  34. config.action_view.annotate_rendered_view_with_filenames = true
  35. # Raise error when a before_action's only/except options reference missing actions.
  36. config.action_controller.raise_on_missing_callback_actions = true
  37. end