Sha256: 0decba19f66e573c2718cf55465872915493671f2e1b792009ca67debf0985c8
Contents?: true
Size: 395 Bytes
Versions: 49
Compression:
Stored size: 395 Bytes
Contents
class Hash # Returns a hash that includes everything but the given keys. This is useful for # limiting a set of parameters to everything but a few known toggles: # # @person.update(params[:person].except(:admin)) def except(*keys) dup.except!(*keys) end # Replaces the hash without the given keys. def except!(*keys) keys.each { |key| delete(key) } self end end
Version data entries
49 entries across 49 versions & 5 rubygems