title: Name Error - uninitialized constant Rails
body: <p>I'm adding search functionality to my ruby on rails app. Based on the Ryan Bates tutorial #111.</p>
  
  <p>For some reason, my render call in my show page is resulting in</p>
  
  <pre><code>Name Error
  uninitialized constant Search::Properties
  </code></pre>
  
  <p><strong>My controller is simple</strong></p>
  
  <pre><code>class SearchesController &lt; ApplicationController
  
      def new
          @search = Search.new
      end
  
      def create
          @search = Search.create(search_params)
          redirect_to @search
      end
  
      def show
          @search = Search.find(params[:id])
      end
  
      private
  
      def search_params
          params.require(:search).permit(:keywords, :category, :min_price, :max_price, :bedrooms, :bathrooms, :garage)
      end
  
  end
  </code></pre>
  
  <p><strong>And I created a new class in my model</strong></p>
  
  <pre><code>class Search &lt; ActiveRecord::Base
  
      def properties
          properties = Properties.all
          properties = properties.order(:title)
          properties = properties.where(["title LIKE ?","%#{keywords}%"]) if keywords.present?
          properties = properties.where([category: category]) if category.present?
          properties = properties.where(["price &gt;= ?","%#{min_price}%"]) if min_price.present?
          properties = properties.where(["price &lt;= ?","%#{max_price}%"]) if max_price.present?
          properties = properties.where(["bedrooms == ?","%#{bedrooms}%"]) if bedrooms.present?
          properties = properties.where(["bathrooms == ?","%#{bathrooms}%"]) if bathrooms.present?
          properties = properties.where(["garage == ?","%#{garage}%"]) if garage.present?
  
          properties
      end
  
  end
  </code></pre>
  
  <p><strong>And my view</strong></p>
  
  <pre><code>&lt;div class="row property-list-wrapper"&gt;
    &lt;div class="container"&gt;
  
      &lt;div class="col-md-8 property-list-left"&gt;
        &lt;h1&gt;We've found &lt;%= pluralize(@properties.count, 'property')%&gt; &lt;/h1&gt;
  
        &lt;%= render @properties %&gt;
  
  
      &lt;/div&gt;
      &lt;div class="col-md-4 property-list-right"&gt;
  
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>It seems that my render tag is not finding the class in my model. Am I missing something in my controller maybe?</p>
  
  <p>I'm using rails 4.2.7 and ruby 2.2.4p230</p>