]> git.openstreetmap.org Git - rails.git/blob - config/environments/development.rb
Add frozen_string_literal comments to ruby files
[rails.git] / config / environments / development.rb
1 # frozen_string_literal: true
2
3 require "active_support/core_ext/integer/time"
4
5 Rails.application.configure do
6   # Settings specified here will take precedence over those in config/application.rb.
7
8   # Make code changes take effect immediately without server restart.
9   config.enable_reloading = true
10
11   # Do not eager load code on boot.
12   config.eager_load = false
13
14   # Show full error reports.
15   config.consider_all_requests_local = true
16
17   # Enable server timing.
18   config.server_timing = true
19
20   # Enable/disable Action Controller caching. By default Action Controller caching is disabled.
21   # Run rails dev:cache to toggle Action Controller caching.
22   if Rails.root.join("tmp/caching-dev.txt").exist?
23     config.action_controller.perform_caching = true
24     config.action_controller.enable_fragment_cache_logging = true
25     config.public_file_server.headers = { "cache-control" => "public, max-age=#{2.days.to_i}" }
26   else
27     config.action_controller.perform_caching = false
28   end
29
30   # Change to :null_store to avoid any caching.
31   config.cache_store = :memory_store
32
33   # Store uploaded files on the local file system (see config/storage.yml for options).
34   config.active_storage.service = :local
35
36   # Don't care if the mailer can't send.
37   config.action_mailer.raise_delivery_errors = false
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 unless Settings.status == "database_offline"
50
51   # Highlight code that triggered database queries in logs.
52   config.active_record.verbose_query_logs = true unless Settings.status == "database_offline"
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   # Raises error for missing translations.
61   # config.i18n.raise_on_missing_translations = true
62
63   # Annotate rendered view with file names.
64   config.action_view.annotate_rendered_view_with_filenames = true
65
66   # Uncomment if you wish to allow Action Cable access from any origin.
67   # config.action_cable.disable_request_forgery_protection = true
68
69   # Raise error when a before_action's only/except options reference missing actions.
70   config.action_controller.raise_on_missing_callback_actions = true
71
72   # Apply autocorrection by RuboCop to files generated by `bin/rails generate`.
73   # config.generators.apply_rubocop_autocorrect_after_generate!
74
75   # Disable host validation.
76   config.hosts = []
77 end