Skip to content
Browse files

Fixing mistake in code example with validates_numericality_of and :on…

…ly_integer option
  • Loading branch information...
1 parent 9cc7a1e commit 301b2fefaa6d6527af7312ac6ffedcc989f66512 @cassiomarques cassiomarques committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 railties/doc/guides/source/activerecord_validations_callbacks.txt
View
2 railties/doc/guides/source/activerecord_validations_callbacks.txt
@@ -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
------------------------------------------------------------------

0 comments on commit 301b2fe

Please sign in to comment.
Something went wrong with that request. Please try again.