Module: VoterLove
- Defined in:
- lib/voter_love.rb,
lib/voter_love/voter.rb,
lib/voter_love/votes.rb,
lib/voter_love/version.rb,
lib/voter_love/votable.rb,
lib/voter_love/exceptions.rb
Defined Under Namespace
Modules: Exceptions, Votable, Voter
Classes: Vote
Constant Summary
collapse
- VERSION =
"0.0.5"
Instance Method Summary
collapse
Instance Method Details
#acts_as_votable ⇒ Object
add this to the model you want to be able to vote on.
Example:
class Links < ActiveRecord::Base
acts_as_votable
end
20
21
22
|
# File 'lib/voter_love.rb', line 20
def acts_as_votable
include Votable
end
|
#acts_as_voter ⇒ Object
24
25
26
|
# File 'lib/voter_love.rb', line 24
def acts_as_voter
include Voter
end
|
#votable? ⇒ Boolean
7
8
9
|
# File 'lib/voter_love.rb', line 7
def votable?
false
end
|
#voter? ⇒ Boolean
11
12
13
|
# File 'lib/voter_love.rb', line 11
def voter?
false
end
|