ActiveSupport::CoreExtensions::Hash::Except


Files

Description

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_attributes(params[:person].except(:admin))

Methods

Public Instance methods

except (*keys)

Returns a new hash without the given keys.

except! (*keys)

Replaces the hash without the given keys.