Sha256: 52d0f9ae0afa2065f99426ac849d269b7f3b86a2e803ba7333ea1992000e79ee
Contents?: true
Size: 697 Bytes
Versions: 2
Compression:
Stored size: 697 Bytes
Contents
module Sprangular::BaseControllerDecorator def self.prepended(base) base.after_filter :set_csrf_cookie_for_ng end protected def set_csrf_cookie_for_ng cookies['XSRF-TOKEN'] = form_authenticity_token if protect_against_forgery? end def verified_request? super || form_authenticity_token == request.headers['X-XSRF-TOKEN'] end end # TODO: should be just Spree::BaseController once base class is fixed here: # https://github.com/DynamoMTL/spree_chimpy/blob/master/app/controllers/spree/chimpy/subscribers_controller.rb#L1 ApplicationController.send(:prepend, Sprangular::BaseControllerDecorator) Spree::BaseController.send(:prepend, Sprangular::BaseControllerDecorator)
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
sprangular-0.1.0 | app/controllers/spree/base_controller_decorator.rb |
sprangular-0.0.1 | app/controllers/spree/base_controller_decorator.rb |