Module: PeteOnRails::Acts::Voter::ClassMethods

Defined in:
lib/acts_as_voter.rb

Instance Method Summary collapse

Instance Method Details

#acts_as_voterObject



11
12
13
14
15
# File 'lib/acts_as_voter.rb', line 11

def acts_as_voter
  has_many :votes, :as => :voter, :dependent => :nullify  # If a voting entity is deleted, keep the votes. 
  include PeteOnRails::Acts::Voter::InstanceMethods
  extend  PeteOnRails::Acts::Voter::SingletonMethods
end