Sha256: 66cb3d9a574f2344fec1864f0479559ee02ca25896ead299b10c3968fb7dbd66

Contents?: true

Size: 447 Bytes

Versions: 1

Compression:

Stored size: 447 Bytes

Contents

# This overrides the before method provided by resource_controller so that the current_user is authorized
# for each action before proceding.
module ResourceController
  module Helpers
    module Internal
      protected
      # Calls the before block for the action, if one is present.
      #
      def before(action)
        authorize! action, object || model
        invoke_callbacks *self.class.send(action).before
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
spree_auth-0.30.0.beta1 app/controllers/resource_controller_decorator.rb