lib/scrivener/validations.rb
# Checks if all the characters of an attribute is a digit.
#
# @param [Symbol] att The attribute you wish to verify the numeric format.
# @param [Array<Symbol, Symbol>] error The error that should be returned
#                                when the validation fails.
Checks if all the characters of an attribute is a digit.
Checks if all the characters of an attribute is a digit .
def assert_numeric(att, error = [att, :not_numeric])
      if assert_present(att, error)
        assert_format(att, /\A\-?\d+\z/, error)
      end
    end
def assert_numeric ( att , error = [ att , :not_numeric ] ) if assert_present ( att , error ) assert_format ( att , / \A \- ? \d + \z / , error ) end end
Checks if all the characters of an attribute is a digit.
Checks if all the characters of an attribute is a digit .
att
<not_specific>
error
<not_specific>
<not_specific>
error The error that should be returned when the validation fails.
error The error that should be returned when the validation fails .