rootstrap/rails_api_base

View on GitHub
app/policies/user_policy.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
# frozen_string_literal: true

class UserPolicy < ApplicationPolicy
  def show?
    update?
  end

  def update?
    user.id == record.id
  end
end