Module: Volleyball::ClassMethods
- Defined in:
- lib/volleyball.rb
Instance Method Summary collapse
Instance Method Details
#votable(args = {}) ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/volleyball.rb', line 11 def votable (args={}) has_many :votes, :as=>:subject before_save :calculate_score cattr_accessor :yes_adjustment cattr_accessor :no_adjustment self.yes_adjustment = args[:yes_start] ? args[:yes_start] : 0 self.no_adjustment = args[:no_start] ? args[:no_start] : 0 include Volleyball::InstanceMethods end |