Module: EacRailsBase0App::Application::Development::ClassMethods

Defined in:
lib/eac_rails_base0/app_base/application/development.rb

Instance Method Summary collapse

Instance Method Details

#setup_assetsObject



15
16
17
18
# File 'lib/eac_rails_base0/app_base/application/development.rb', line 15

def setup_assets
  config.assets.debug = true
  config.assets.quiet = true
end

#setup_cacheObject

rubocop:disable Metrics/AbcSize



20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/eac_rails_base0/app_base/application/development.rb', line 20

def setup_cache # rubocop:disable Metrics/AbcSize
  if Rails.root.join('tmp/caching-dev.txt').exist?
    config.action_controller.perform_caching = true
    config.cache_store = :memory_store
    config.public_file_server.headers = {
      'Cache-Control' => "public, max-age=#{2.days.seconds.to_i}"
    }
  else
    config.action_controller.perform_caching = false
    config.cache_store = :null_store
  end
end

#setup_generalObject

rubocop:disable Metrics/AbcSize



33
34
35
36
37
38
39
40
41
# File 'lib/eac_rails_base0/app_base/application/development.rb', line 33

def setup_general # rubocop:disable Metrics/AbcSize
  config.cache_classes = false
  config.eager_load = false
  config.consider_all_requests_local = true
  config.action_mailer.raise_delivery_errors = false
  config.action_mailer.perform_caching = false
  config.active_record.migration_error = :page_load
  config.file_watcher = ActiveSupport::EventedFileUpdateChecker
end

#setup_letter_openerObject



43
44
45
46
47
# File 'lib/eac_rails_base0/app_base/application/development.rb', line 43

def setup_letter_opener
  require 'letter_opener'
  config.action_mailer.delivery_method = :letter_opener
  config.action_mailer.perform_deliveries = true
end

#setup_logObject



49
50
51
52
# File 'lib/eac_rails_base0/app_base/application/development.rb', line 49

def setup_log
  config.active_support.deprecation = :log
  config.logger = new_stdout_logger
end