How often are you really going to have fields in your database that will have ientical values that you can look up like that? Enough to worry about using a dynamic finder method? Probably not. What's wrong with a named_scope for this?
class User < ActiveRecord::Base
named_scope :user_or_email, lambda{ |user_name|
{ :conditions => ["username =? OR email =?", user_name, user_name] }
}
end
That does what you want, and I just don't think this kind of thing will pop up often enough to justify dynamic finders for it, but hey I could be wrong.