title: How to make a field unique by the result of a coalesce operation?
body: <pre><code>class Person
    validates :full_name, presence: true
    validates :display_name, unique: ???
    attr_acessible :full_name, :display_name
  end
  </code></pre>
  
  <p>Full names can not be unique, but the display name must be unique. If I want to have the full_name as a fallback, but I still want to check for uniqueness of the display_name.</p>
  
  <p>What is the cleanest way to validate the uniqueness of <code>coalesce(display_name, full_name)</code> or whatever is necessary to achieve the same effect?</p>