lib/hash_control/validator.rb
# Checks that only the the previously mentioned keys exist
# In Rails, `permit' will do this as well, but having this as a separate
# option allows for specifying permit not at the beginning of the chain
Checks that only the the previously mentioned keys exist
In Rails, `permit' will do this as well, but having this as a separate
option allows for specifying permit not at the beginning of the chain
Checks that only the the previously mentioned keys exist In Rails ` permit ' will do this as well but having this as a separate option allows for specifying permit not at the beginning of the chain
def only
      unless (extra_keys = hash_keys - permitted_keys).empty?
        error "extra #{terms} #{extra_keys.to_a}" + postscript
      end
      self
    end
def only unless ( extra_keys = hash_keys - permitted_keys ) . empty? error "extra #{terms} #{extra_keys.to_a}" + postscript end self end
Checks that only the the previously mentioned keys exist
In Rails, `permit' will do this as well, but having this as a separate
option allows for specifying permit not at the beginning of the chain
Checks that only the the previously mentioned keys exist In Rails ` permit ' will do this as well but having this as a separate option allows for specifying permit not at the beginning of the chain