I know this is an old question, but since it's still the top hit on google, I thought I'd share my solution to it which is packaged up as a gem. Take a look at
https://github.com/blackrat/acts_as_enumeration
From the readme:
So if a database table had a column called "name", declaring
acts_as_enumeration :name
would select all of the items in that column and map them in a hash to their primary key values.
In addition, it creates the instance methods is_#{key} where key is all of the values in that column, is?(array) and is_not?(array) that check for type within that array.
Keeping name as our column example, the class methods id_for_name will return the primary key value for that mapping and valid_name?(value) will say if the table contains and entry in the name column with that value.
Finally, the method missing allows for is_ and is_not chaining of methods, such as is_paul_or_michael_or_luke? which has the same effect as (is_paul? || is_michael? || is_luke?) or is?(:paul, :michael, :luke) and is_not_paul_or_michael_or_like which has the same effect as !(is_paul || is_michael? || is_luke?) or !is?(:paul, :michael, :luke)
CAVEAT: Due to the mechanism that the method_missing uses, if someone actually had the name "not bruce", the combination query cannot use this as the first element. i.e. "not " not just "not bruce".
So a combination of is_not_bruce_or_paul? would have to be written is_paul_or_not_bruce? to have the desired effect. is_not_not_bruce_or_paul is fine, but the chances of this happening are about as likely as someone actually called "not bruce" outside of a Monty Python sketch.
(Which means it probably will, so before you change code to support a new entry, try just changing the order)