Fixing mistake in code example with validates_numericality_of and :only_integer option

This commit is contained in:
CassioMarques
2009-01-15 00:15:02 -02:00
parent 9cc7a1e04d
commit 301b2fefaa

View File

@@ -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
------------------------------------------------------------------