I have a method that needs to loop through a hash and check if each key exists in a model's table, otherwise it will delete the key/value.

For example:

number_hash = { :one => "one", :two => "two" }

and the Number table only has a :one column so :two will be deleted.

How do I check if a model has an attribute or not?

Edit
Report