ruby find if key exists in hash code example Example: rails check if key exists object.key? :some_key