lib/active_record/where_chain_shared_methods.rb
# Ensures that the arguments passed to methods are a Hash and that the value in the argument
# hash is not another Hash or Array.
Ensures that the arguments passed to methods are a Hash and that the value in the argument
hash is not another Hash or Array.
Ensures that the arguments passed to methods are a Hash and that the value in the argument hash is not another Hash or Array .
def ensure_proper_attributes(opts)
        raise ArgumentError, 'This method requires a Hash as an argument.' unless opts.is_a?(Hash)
        opts.each_pair do |_key, value|
          if value.is_a?(Hash) || value.is_a?(Array)
            raise ArgumentError, 'The value passed to this method should be a valid type.'
          end
        end
      end
def ensure_proper_attributes ( opts ) raise ArgumentError , 'This method requires a Hash as an argument.' unless opts . is_a? ( Hash ) opts . each_pair do | _key , value | if value . is_a? ( Hash ) || value . is_a? ( Array ) raise ArgumentError , 'The value passed to this method should be a valid type.' end end end
Ensures that the arguments passed to methods are a Hash and that the value in the argument
hash is not another Hash or Array.
Ensures that the arguments passed to methods are a Hash and that the value in the argument hash is not another Hash or Array .
opts