mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Fixing mistake in code example with validates_numericality_of and :only_integer option
This commit is contained in:
@@ -223,7 +223,7 @@ If you set +:integer_only+ to +true+, then it will use the +$$/\A[+\-]?\d+\Z/$$+
|
||||
------------------------------------------------------------------
|
||||
class Player < ActiveRecord::Base
|
||||
validates_numericality_of :points
|
||||
validates_numericality_of :games_played, :integer_only => true
|
||||
validates_numericality_of :games_played, :only_integer => true
|
||||
end
|
||||
------------------------------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user