aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2017-02-17 23:11:01 +0900
committerRyuta Kamizono <kamipo@gmail.com>2017-02-17 23:11:01 +0900
commit33860b3556b0e922f16ebec1fc7b985bc4c23d17 (patch)
treeb3bbb9f5a2cd11306bfbd4306c1914a3c146d322 /activemodel/lib/active_model
parent46bf9eea533f8a2fedbb0aaad12cae1c5a4b9612 (diff)
downloadrails-33860b3556b0e922f16ebec1fc7b985bc4c23d17.tar.gz
rails-33860b3556b0e922f16ebec1fc7b985bc4c23d17.tar.bz2
rails-33860b3556b0e922f16ebec1fc7b985bc4c23d17.zip
Remove `:doc:` for `NumericalityValidator` [ci skip]
The `:doc:` was added in cdb9d7f but `NumericalityValidator` is already `:nodoc:` class. `:doc:` is unneeded. https://github.com/rails/rails/blob/master/activemodel/lib/active_model/validations/numericality.rb#L3
Diffstat (limited to 'activemodel/lib/active_model')
-rw-r--r--activemodel/lib/active_model/validations/numericality.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/activemodel/lib/active_model/validations/numericality.rb b/activemodel/lib/active_model/validations/numericality.rb
index 4bfc402069..30a9ef472d 100644
--- a/activemodel/lib/active_model/validations/numericality.rb
+++ b/activemodel/lib/active_model/validations/numericality.rb
@@ -63,27 +63,27 @@ module ActiveModel
private
- def is_number?(raw_value) # :doc:
+ def is_number?(raw_value)
!parse_raw_value_as_a_number(raw_value).nil?
rescue ArgumentError, TypeError
false
end
- def parse_raw_value_as_a_number(raw_value) # :doc:
+ def parse_raw_value_as_a_number(raw_value)
Kernel.Float(raw_value) if raw_value !~ /\A0[xX]/
end
- def is_integer?(raw_value) # :doc:
+ def is_integer?(raw_value)
/\A[+-]?\d+\z/ === raw_value.to_s
end
- def filtered_options(value) # :doc:
+ def filtered_options(value)
filtered = options.except(*RESERVED_OPTIONS)
filtered[:value] = value
filtered
end
- def allow_only_integer?(record) # :doc:
+ def allow_only_integer?(record)
case options[:only_integer]
when Symbol
record.send(options[:only_integer])