Welcome to the thumbs_up wiki!
# One vote per user, unless editor role or higher validates_uniqueness_of :voteable_id, :scope => [:voteable_type, :voter_type, :voter_id], message: "only one vote allowed", unless: Proc.new { |vote| vote.voter.role? :editor }
(contributed in #54)
module ThumbsUp module ActsAsVoter module InstanceMethods def voted_for_today?(voteable) 0 < Vote.where( :voter_id => self.id, :voter_type => self.class.base_class.name, :voteable_id => voteable.id, :voteable_type => voteable.class.base_class.name, :day_created_at => DateTime.now.utc.midnight ).count end end end end