_parse_validates_options(options) protected

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activemodel/lib/active_model/validations/validates.rb, line 96
      def _parse_validates_options(options) #:nodoc:
        case options
        when TrueClass
          {}
        when Hash
          options
        when Regexp
          { :with => options }
        when Range, Array
          { :in => options }
        else
          raise ArgumentError, "#{options.inspect} is an invalid option. Expecting true, Hash, Regexp, Range, or Array"
        end
      end
Register or log in to add new notes.