diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index f3ddff301c..4181c9c1de 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1,7 +1,11 @@ +require "application_responder" require 'open_food_network/referer_parser' require_dependency 'spree/authentication_helpers' class ApplicationController < ActionController::Base + self.responder = ApplicationResponder + respond_to :html + protect_from_forgery prepend_before_action :restrict_iframes diff --git a/lib/application_responder.rb b/lib/application_responder.rb new file mode 100644 index 0000000000..cc3e588853 --- /dev/null +++ b/lib/application_responder.rb @@ -0,0 +1,8 @@ +class ApplicationResponder < ActionController::Responder + include Responders::FlashResponder + include Responders::HttpCacheResponder + + # Redirects resources to the collection path (index action) instead + # of the resource path (show action) for POST/PUT/DELETE requests. + # include Responders::CollectionResponder +end