hummingbird-me/kitsu-server

View on GitHub
app/policies/linked_account_policy.rb

Summary

Maintainability
A
0 mins
Test Coverage
B
85%
class LinkedAccountPolicy < ApplicationPolicy
  alias_method :create?, :is_owner?
  alias_method :update?, :is_owner?
  alias_method :destroy?, :is_owner?

  class Scope < Scope
    def resolve
      scope.where(user: user)
    end
  end
end