app/models/person.rb
def remove_permissions
    permissions = Permission.where(["contributor_type =? and contributor_id=?", 'Person', id])
    permissions.each do |p|
      p.destroy
    end
  end
#remove the permissions which are set on this person
remove the permissions which are set on this person
remove the permissions which are set on this person
def remove_permissions
    permissions = Permission.where(["contributor_type =? and contributor_id=?", 'Person', id])
    permissions.each do |p|
      p.destroy
    end
  end
def remove_permissions permissions = Permission . where ( [ "contributor_type =? and contributor_id=?" , 'Person' , id ] ) permissions . each do | p | p . destroy end end
remove the permissions which are set on this person
remove the permissions which are set on this person