Sha256: e339a9c062c0809261d69f72a6a1db238a3818cb1b17ef25dc45f263a81ccd8a

Contents?: true

Size: 417 Bytes

Versions: 7

Compression:

Stored size: 417 Bytes

Contents

module Trax
  module Controller
    module Authorization
      module Pundit
        class BasePolicy
          attr_accessor :user, :resource, :result

          #Result is set to true by default because it makes chaining easy with &&=
          def initialize(user, resource)
            @user = user
            @resource = resource
            @result = true
          end
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
trax_controller-1.0.0 lib/trax/controller/authorization/pundit/base_policy.rb
trax_controller-0.1.4 lib/trax/controller/authorization/pundit/base_policy.rb
trax_controller-0.1.3 lib/trax/controller/authorization/pundit/base_policy.rb
trax_controller-0.1.2 lib/trax/controller/authorization/pundit/base_policy.rb
trax_controller-0.1.1 lib/trax/controller/authorization/pundit/base_policy.rb
trax_controller-0.1.0 lib/trax/controller/authorization/pundit/base_policy.rb
trax_controller-0.0.4 lib/trax/controller/authorization/pundit/base_policy.rb