instance method
except
Ruby on Rails 4.0.13
Since v2.3.18 Last seen in v7.2.3Signature
except(*keys)
Return 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))
Parameters
-
keysrest
Source
# File activesupport/lib/active_support/core_ext/hash/except.rb, line 6
def except(*keys)
dup.except!(*keys)
end
Defined in activesupport/lib/active_support/core_ext/hash/except.rb line 6
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Hash