validates :score,:greater_than => 0,:on => :update
但是,我收到此错误:
Unknown validator: 'greater_than'
我找到了more_than验证器here.感谢您的帮助.
validates :score,:numericality => {:greater_than => 0},:on => :update