Class: Vote

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/vote.rb

Instance Method Summary collapse

Instance Method Details

#down?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'app/models/vote.rb', line 10

def down?
  self.value<0
end

#up?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'app/models/vote.rb', line 6

def up?
  self.value>0
end