rubyforgood/babywearing

View on GitHub
app/policies/location_policy.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

class LocationPolicy < ApplicationPolicy
  attr_reader :user, :location

  def initialize(user, location)
    @user = user
    @location = location
  end

  def index?
    authorized_admin?
  end

  def new?
    authorized_admin?
  end

  def create?
    authorized_admin?
  end

  def edit?
    authorized_admin?
  end

  def update?
    authorized_admin?
  end

  def destroy?
    authorized_admin?
  end
end