Sha256: 99e19fe954993f2fd3850ff3a7d3a47d48055bac89d95570321bca32c6dafac1

Contents?: true

Size: 602 Bytes

Versions: 1

Compression:

Stored size: 602 Bytes

Contents

# frozen_string_literal: true

module Maquina
  class ApplicationPolicy < ActionPolicy::Base
    def index?
      false
    end

    def show?
      false
    end

    def new?
      false
    end

    def create?
      new?
    end

    def edit?
      false
    end

    def update?
      edit?
    end

    def destroy?
      false
    end

    def new_modal?
      false
    end

    private

    def management?
      user.management?
    end

    # Define shared methods useful for most policies.
    # For example:
    #
    #  def owner?
    #    record.user_id == user.id
    #  end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
maquina-0.1.0 app/policies/maquina/application_policy.rb