214
|
1 require "active_support/core_ext/integer/time"
|
|
2
|
0
|
3 Rails.application.configure do
|
|
4 # Settings specified here will take precedence over those in config/application.rb.
|
|
5
|
214
|
6 # In the development environment your application's code is reloaded any time
|
|
7 # it changes. This slows down response time but is perfect for development
|
0
|
8 # since you don't have to restart the web server when you make code changes.
|
254
|
9 config.enable_reloading = true
|
0
|
10
|
|
11 # Do not eager load code on boot.
|
|
12 config.eager_load = false
|
|
13
|
72
|
14 # Show full error reports.
|
|
15 config.consider_all_requests_local = true
|
|
16
|
254
|
17 # Enable server timing.
|
223
|
18 config.server_timing = true
|
|
19
|
72
|
20 # Enable/disable caching. By default caching is disabled.
|
185
|
21 # Run rails dev:cache to toggle caching.
|
254
|
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
|
72
|
25
|
254
|
26 config.cache_store = :memory_store
|
|
27 config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{2.days.to_i}" }
|
|
28 else
|
|
29 config.action_controller.perform_caching = false
|
72
|
30
|
254
|
31 config.cache_store = :null_store
|
|
32 end
|
0
|
33
|
|
34 # Print deprecation notices to the Rails logger.
|
|
35 config.active_support.deprecation = :log
|
|
36
|
214
|
37 # Raise exceptions for disallowed deprecations.
|
|
38 config.active_support.disallowed_deprecation = :raise
|
|
39
|
|
40 # Tell Active Support which deprecation messages to disallow.
|
|
41 config.active_support.disallowed_deprecation_warnings = []
|
|
42
|
185
|
43 # Raises error for missing translations.
|
214
|
44 # config.i18n.raise_on_missing_translations = true
|
|
45
|
|
46 # Annotate rendered view with file names.
|
254
|
47 config.action_view.annotate_rendered_view_with_filenames = true
|
72
|
48
|
254
|
49 # Raise error when a before_action's only/except options reference missing actions.
|
|
50 config.action_controller.raise_on_missing_callback_actions = true
|
0
|
51 end
|