Sha256: 71dbeb8f2bb8b9f5a3a9edede535f4928f7432bdd0a2dad48fefc40ba4b18b74

Contents?: true

Size: 482 Bytes

Versions: 6

Compression:

Stored size: 482 Bytes

Contents

module Api
  module V1
    module Locations
      class Policy < ApplicationPolicy
        # @return [Boolean]
        def show?
          first_quadrant?
        end

        # @return [Boolean]
        def update?
          first_quadrant?
        end

        # @return [Boolean]
        def destroy?
          first_quadrant?
        end

        private

        def first_quadrant?
          record.quadrant == Location::FIRST_QUADRANT
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
infinum_json_api_setup-0.0.8 spec/dummy/app/web/api/v1/locations/policy.rb
infinum_json_api_setup-0.0.7 spec/dummy/app/web/api/v1/locations/policy.rb
infinum_json_api_setup-0.0.6 spec/dummy/app/web/api/v1/locations/policy.rb
infinum_json_api_setup-0.0.5 spec/dummy/app/web/api/v1/locations/policy.rb
infinum_json_api_setup-0.0.4 spec/dummy/app/web/api/v1/locations/policy.rb
infinum_json_api_setup-0.0.3 spec/dummy/app/web/api/v1/locations/policy.rb