title: Custom validator does not load in Ruby on Rails
body: <p>I am trying to apply a custom validator to my model issue.rb:</p>
  
  <pre><code>class Issue &lt; ActiveRecord::Base
    attr_accessible :description, :no_followers, :title
    validates_presence_of :title
    validates_uniqueness_of :title, message: "Title should be unique!"
  
    validates_length_of :description, minimum: 10, maximum: 50
    validates_numericality_of :no_followers, allow_blank: true
  
    validates_with YesNoValidator
  
  end
  </code></pre>
  
  <p>The validator is a file located at app/validators and contains the following:</p>
  
  <pre><code>class YesNoValidator &lt; ActiveModel::Validator
      def validate record
          if record.title.include? "yes" &amp;&amp; record.description.include? "No"
              record.errors[:title] &lt;&lt; "Title has the word yes and description has the word no"
          end 
      end
  end
  </code></pre>
  
  <p>I also tried to put it inside the lib folder but that also gives this error:</p>
  
  <pre><code>Routing Error
  
  uninitialized constant Issue::YesNoValidator
  </code></pre>
  
  <p>At random F5'ing I sometimes get this error:</p>
  
  <pre><code>NoMethodError in IssuesController#new
  
  undefined method `key?' for nil:NilClass
  </code></pre>
  
  <p>So it seems like the file with the class is not loaded so I tried adding both the lib as well als the app/validators folder to the autoload_paths in application.rb. But this doesn't work either..</p>
  
  <p>Has anyone experienced this before?</p>