Class: Turbo::Application

Inherits:
Rails::Application
  • Object
show all
Defined in:
lib/turbo/application.rb

Class Method Summary collapse

Class Method Details

.configure_for_turboObject

Some settings we’re not sure if we want, so let’s not laod them by default. Instead, wait for this method to be invoked (to get around load-order complications).



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/turbo/application.rb', line 18

def self.configure_for_turbo
  if defined?(ActionController) && defined?(ActionController::Engine)
    config.action_dispatch.show_exceptions            = false
    config.action_controller.perform_caching          = false
    config.action_controller.allow_forgery_protection = false
  end

  if defined?(ActionMailer) && defined?(ActionMailer::Engine)
    config.action_mailer.delivery_method     = :test
    config.action_mailer.default_url_options = { :host => 'www.example.com' }
  end

  if defined?(Sprockets)
    config.assets.enabled = true
  end
end