You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

development.rb 2.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. # frozen_string_literal: true
  2. require 'active_support/core_ext/integer/time'
  3. Rails.application.configure do
  4. # Settings specified here will take precedence over those in config/application.rb.
  5. # In the development environment your application's code is reloaded any time
  6. # it changes. This slows down response time but is perfect for development
  7. # since you don't have to restart the web server when you make code changes.
  8. config.enable_reloading = true
  9. # Do not eager load code on boot.
  10. config.eager_load = false
  11. # Show full error reports.
  12. config.consider_all_requests_local = true
  13. # Enable/disable caching. By default caching is disabled.
  14. # Run rails dev:cache to toggle caching.
  15. if Rails.root.join('tmp', 'caching-dev.txt').exist?
  16. config.action_controller.perform_caching = true
  17. config.action_controller.enable_fragment_cache_logging = true
  18. config.cache_store = :memory_store
  19. config.public_file_server.headers = {
  20. 'Cache-Control' => "public, max-age=#{2.days.to_i}"
  21. }
  22. else
  23. config.action_controller.perform_caching = false
  24. config.cache_store = :null_store
  25. end
  26. # Print deprecation notices to the Rails logger.
  27. config.active_support.deprecation = [:stderr, :log]
  28. # Raise exceptions for disallowed deprecations.
  29. config.active_support.disallowed_deprecation = :raise
  30. # Tell Active Support which deprecation messages to disallow.
  31. config.active_support.disallowed_deprecation_warnings = []
  32. # Raise an error on page load if there are pending migrations.
  33. config.active_record.migration_error = :page_load
  34. # Highlight code that triggered database queries in logs.
  35. config.active_record.verbose_query_logs = true
  36. # Raises error for missing translations.
  37. # config.i18n.raise_on_missing_translations = true
  38. # Annotate rendered view with file names.
  39. config.action_view.annotate_rendered_view_with_filenames = 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 = ActiveSupport::EventedFileUpdateChecker
  43. # Uncomment if you wish to allow Action Cable access from any origin.
  44. # config.action_cable.disable_request_forgery_protection = true
  45. end