app/models/vetted.rb
# curate an object, without the curating code needing to know anything about the methods used to do so.
curate an object, without the curating code needing to know anything about the methods used to do so.
curate an object without the curating code needing to know anything about the methods used to do so .
def apply_to(object, user)
    raise 'invalid vetted type' unless can_apply?
    case id
    when Vetted.untrusted.id
      object.untrust(user)
    when Vetted.trusted.id
      object.trust(user)
    when Vetted.unknown.id
      object.unreviewed(user)
    end
  end
def apply_to ( object , user ) raise 'invalid vetted type' unless can_apply? case id when Vetted . untrusted . id object . untrust ( user ) when Vetted . trusted . id object . trust ( user ) when Vetted . unknown . id object . unreviewed ( user ) end end
curate an object, without the curating code needing to know anything about the methods used to do so.
curate an object without the curating code needing to know anything about the methods used to do so .
object
<not_specific>
user
<not_specific>