Class: Rateable::Rate
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Rateable::Rate
- Defined in:
- lib/rateable/rate.rb
Instance Method Summary collapse
Instance Method Details
permalink #stars_must_be_in_range ⇒ Object
[View source]
10 11 12 13 14 |
# File 'lib/rateable/rate.rb', line 10 def stars_must_be_in_range unless (1..rateable.max_stars).include? stars errors.add :stars, "must be within 1 to #{rateable.max_stars}" end end |