mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Validate poll arguments. (#6740)
* FIX: Validate number poll. * FEATURE: Poll's min can be 0. * FIX: Fix URL to user profile.
This commit is contained in:
committed by
Régis Hanol
parent
0fca3205b5
commit
e49bcebb35
@@ -29,7 +29,7 @@ class Poll < ActiveRecord::Base
|
||||
everyone: 1,
|
||||
}
|
||||
|
||||
validates :min, numericality: { allow_nil: true, only_integer: true, greater_than: 0 }
|
||||
validates :min, numericality: { allow_nil: true, only_integer: true, greater_than_or_equal_to: 0 }
|
||||
validates :max, numericality: { allow_nil: true, only_integer: true, greater_than: 0 }
|
||||
validates :step, numericality: { allow_nil: true, only_integer: true, greater_than: 0 }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user