I am using Ruby on Rails 3.2.2 and I am looking for a method which is the opposite of except
for hashes (except
documentation), probably an only
method. Is there some method or an easy way so that I can return a hash that includes only the given keys?
# Example, 'only' method as opposite to the 'except'
@person.update_attributes(params[:person].only(:name, :surname))