app/models/user.rb
# given an object with roles, checks to see if the user belongs to one of those roles
given an object with roles, checks to see if the user belongs to one of those roles
given an object with roles checks to see if the user belongs to one of those roles
def has_proper_role_for?(thing)
    self.roles.each do |role|
      if thing.roles.include?(role)
        return true
      end
    end
    return false
  end
def has_proper_role_for? ( thing ) self . roles . each do | role | if thing . roles . include? ( role ) return true end end return false end
given an object with roles, checks to see if the user belongs to one of those roles
given an object with roles checks to see if the user belongs to one of those roles
thing