Method: Rateable::Rate#stars_must_be_in_range
- Defined in:
- lib/rateable/rate.rb
#stars_must_be_in_range ⇒ Object
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 |