title: Is it possible to group validation?
body: <p>I am using a lot of my own validation methods to compare the data from one association to the other.  I've noticed that I'm constantly checking that my associations aren't nil before trying to call anything on them, but I am also validating their presence, and so I feel that my nil checks are redundant.  Here's an example:</p>
  
  <pre><code>class House &lt; ActiveRecord::Base
    has_one :enterance, :class =&gt; Door
    has_one :exit, :class =&gt; Door
  
    validates_presence_of :enterance, :exit
  
    validate :not_a_fire_hazard
    def not_a_fire_hazard
      if enterance &amp;&amp; exit &amp;&amp; enterance.location != exit.location
        errors.add_to_base('If there is a fire you will most likely die')
        return false
      end
    end
  end
  </code></pre>
  
  <p>I feel like I am repeating myself by checking the existence of enterance and exit within my own validation.</p>
  
  <p>Is there a more "The Rails Way" to do this?</p>