assemblymade/coderwall

View on GitHub
app/models/concerns/protip_ownership.rb

Summary

Maintainability
A
0 mins
Test Coverage
module ProtipOwnership
  extend ActiveSupport::Concern

  def owned_by?(owner)
    user == owner || owner.admin?
  end
  alias_method :owner?, :owned_by?
end