title: Custom validation method not included if called in 2 validate statement
body: <p>As the title says, I am trying to reuse my custom validation method in a Rails 4 model.
  I have a situation similar to this:</p>
  
  <pre><code>class Resource &lt; ActiveRecord::Base
    RESOURCE_TYPE = ["webpage", "image", "video", "paragraph"]
  
    validates :type, presence: true
    validate :always_invalid, if: :webpage?
    validate :always_invalid, if: :image?
  
    def always_invalid
      binding.pry
      errors.add(:data, "Invalid")
    end
  
    # methods for type checking
    RESOURCE_TYPE.each do |res_type|
      define_method("#{res_type}?") { self.type == res_type }
    end
  end
  </code></pre>
  
  <p>I expect that this will fail the validation for objects where type is <code>webpage</code> or <code>image</code>. However, when I try to run, only object with <code>image</code> for type is invalidated.</p>
  
  <pre><code>&gt; a
  =&gt; #&lt;Resource id: nil, type: "webpage", data: {:url=&gt;"http://morar.net/forest"}, created_at: nil, updated_at: nil&gt;
  &gt; a.webpage?
  =&gt; true
  &gt; a.valid?
  =&gt; true
  
  
  &gt; b
  =&gt; #&lt;Resource id: nil, type: "image", data: {:url=&gt;"http://powlowski.info/colleen.langworth/nulla.png"}, created_at: nil, updated_at: nil&gt;
  &gt; b.image?
  =&gt; true
  &gt; b.valid?
  
  From: /home/mark/source/summer/app/models/resource.rb @ line 13 Resource#always_invalid:
  
      12: def always_invalid
   =&gt; 13:   binding.pry
      14:   errors.add(:data, "Invalid")
      15:   # return false
      16: end
  
  &gt; exit
  =&gt; false
  </code></pre>
  
  <p>So it seems that only the last validate: statement is working. </p>
  
  <p>Changing the order of the 2 validate statement turn things around: object of type <code>webpage</code> is invalidated while those with <code>image</code> for type doesn't.</p>
  
  <p>It would be great if you can explain why it happened.</p>
  
  <p>Thanks</p>
  
  <p>PS: My schema, in case you need it:</p>
  
  <pre><code>create_table "resources", force: true do |t|
    t.string   "type"
    t.json     "data"
    t.datetime "created_at"
    t.datetime "updated_at"
  end
  </code></pre>