rails opposite of except code example
Example 1: rails excep
hash = { a: true, b: false, c: nil }
hash.except(:c) # => { a: true, b: false }
hash.except(:a, :b) # => { c: nil }
hash # => { a: true, b: false, c: nil }
params_to_remove_array = [ :b, :c ]
params.except(*params_to_remove_array) # => { a: true }
Example 2: ruby omit key
hash.except(:key)