| 1 | require "active_support/core_ext/integer/time" |
| 2 | |
| 3 | Rails.application.configure do |
| 4 | # Settings specified here will take precedence over those in config/application.rb. |
| 5 | |
| 6 | # Make code changes take effect immediately without server restart. |
| 7 | config.enable_reloading = true |
| 8 | |
| 9 | # Do not eager load code on boot. |
| 10 | config.eager_load = false |
| 11 | |
| 12 | # Show full error reports. |
| 13 | config.consider_all_requests_local = true |
| 14 | |
| 15 | # Enable server timing. |
| 16 | config.server_timing = true |
| 17 | |
| 18 | # Enable/disable Action Controller caching. By default Action Controller caching is disabled. |
| 19 | # Run rails dev:cache to toggle Action Controller caching. |
| 20 | if Rails.root.join("tmp/caching-dev.txt").exist? |
| 21 | config.action_controller.perform_caching = true |
| 22 | config.action_controller.enable_fragment_cache_logging = true |
| 23 | config.public_file_server.headers = { "cache-control" => "public, max-age=#{2.days.to_i}" } |
| 24 | else |
| 25 | config.action_controller.perform_caching = false |
| 26 | end |
| 27 | |
| 28 | # Change to :null_store to avoid any caching. |
| 29 | config.cache_store = :memory_store |
| 30 | |
| 31 | # Store uploaded files on the local file system (see config/storage.yml for options). |
| 32 | config.active_storage.service = :local |
| 33 | |
| 34 | # Don't care if the mailer can't send. |
| 35 | config.action_mailer.raise_delivery_errors = false |
| 36 | config.action_mailer.delivery_method = :letter_opener |
| 37 | config.action_mailer.perform_deliveries = true |
| 38 | |
| 39 | # Make template changes take effect immediately. |
| 40 | config.action_mailer.perform_caching = false |
| 41 | |
| 42 | # Set localhost to be used by links generated in mailer templates. |
| 43 | config.action_mailer.default_url_options = { host: "localhost", port: 3000 } |
| 44 | |
| 45 | # Print deprecation notices to the Rails logger. |
| 46 | config.active_support.deprecation = :log |
| 47 | |
| 48 | # Raise an error on page load if there are pending migrations. |
| 49 | config.active_record.migration_error = :page_load |
| 50 | |
| 51 | # Highlight code that triggered database queries in logs. |
| 52 | config.active_record.verbose_query_logs = true |
| 53 | |
| 54 | # Append comments with runtime information tags to SQL queries in logs. |
| 55 | config.active_record.query_log_tags_enabled = true |
| 56 | |
| 57 | # Highlight code that enqueued background job in logs. |
| 58 | config.active_job.verbose_enqueue_logs = true |
| 59 | |
| 60 | # Highlight code that triggered redirect in logs. |
| 61 | config.action_dispatch.verbose_redirect_logs = true |
| 62 | |
| 63 | # Suppress logger output for asset requests. |
| 64 | config.assets.quiet = true |
| 65 | |
| 66 | # Raises error for missing translations. |
| 67 | # config.i18n.raise_on_missing_translations = true |
| 68 | |
| 69 | # Annotate rendered view with file names. |
| 70 | config.action_view.annotate_rendered_view_with_filenames = true |
| 71 | |
| 72 | # Uncomment if you wish to allow Action Cable access from any origin. |
| 73 | # config.action_cable.disable_request_forgery_protection = true |
| 74 | |
| 75 | # Raise error when a before_action's only/except options reference missing actions. |
| 76 | config.action_controller.raise_on_missing_callback_actions = true |
| 77 | |
| 78 | # Apply autocorrection by RuboCop to files generated by `bin/rails generate`. |
| 79 | # config.generators.apply_rubocop_autocorrect_after_generate! |
| 80 | end |