docbrown/app/controllers/application_metal_controller.rb
Ben Halpern b938dab91b
Add ApplicationMetalController to relevant controllers (#4937)
* Add ApplicationMetalController to relevant controllers

* Add request forgery protection to metal

* Remove logger call

* Add logger keyword and skip protect_from_forgery in test

* Uncomment main_image in test
2019-11-26 16:29:07 -05:00

18 lines
587 B
Ruby

class ApplicationMetalController < ActionController::Metal
# Any shared behavior across metal-oriented controllers can go here.
# These are basic things we likely want for any metal controllers
include ActionController::Cookies
include ActionController::RequestForgeryProtection
# ActionController modules which may not be used in each controller can go in
# the specific controller.
protect_from_forgery with: :exception, prepend: true unless Rails.env.test?
include SessionCurrentUser
include ValidRequest
def logger
ActionController::Base.logger
end
end