Sha256: d72de33c76bab25e7a61d8034d0ee7d76738d9338e337a80297861d6de4b2e29
Contents?: true
Size: 503 Bytes
Versions: 1
Compression:
Stored size: 503 Bytes
Contents
module ActsAsVotable::Init # voter module Voter def voter? false end def acts_as_voter(*args) class_eval do belongs_to :voter, :polymorphic => true def self.voter? true end include ActsAsVotable::Voter ActsAsVotable::Alias::words_to_alias self, %w(likes upvotes up_votes), :vote_up_for ActsAsVotable::Alias::words_to_alias self, %w(dislikes downvotes down_votes), :vote_down_for end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
acts_as_votable-0.1.0 | lib/acts_as_votable/init/voter.rb |