title: STI causing an issue when running application locally
body: <p>I am currently working on a Ruby on Rails v4 application.</p>
  
  <p>I created a single table inheritance for two sub-users, <code>buyer</code> and <code>seller</code>, inheriting from the main <code>user</code> table. Since doing that there seems to be an issue when running the application at localhost:3000.</p>
  
  <p>When signing up as a new user I get the following error on the browser page:</p>
  
  <pre><code>NoMethodError in Home#main
  Showing /Users//Development/secret-project/app/views/layouts/home.html.erb where line #84 raised:
  undefined method `seller' for User: 0x00000105714bb0
  </code></pre>
  
  <p>Here's the code from home.html.erb:</p>
  
  <pre><code>        &lt;div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"&gt;`
  </code></pre>
  
  <p><strong><em>line #84</em></strong>     <code>&lt;%= render_navigation :context =&gt; (current_user.blank? ? :guest : :user) %&gt;
                  &lt;%= render_navigation :expand_all =&gt; true, :context =&gt; :auth %&gt;
              &lt;/div&gt;&lt;!-- /.navbar-collapse --&gt;
          &lt;/div&gt;&lt;!-- /.container-fluid --&gt;</code></p>
  
  <p>The browser also gave the following details:</p>
  
  <pre><code>app/views/layouts/home.html.erb:84:in '_app_views_layouts_home_html_erb___4408338611430956041_2173428480'
  app/controllers/home_controller.rb:7:in `main'
  </code></pre>
  
  <p>The home_controller code is:</p>
  
  <pre><code>class HomeController &lt; ApplicationController
  
    def main
      @search = Search.new
      @jobs = Product.where("")
  
      render :layout =&gt; 'home'
    end
  
    def index
      page = params.has_key?(:page)? params[:page].to_i : 1
      per_page = 20
    end
  
    def contact
       redirect_to :contact
    end
  end
  </code></pre>
  
  <p>What have I not updated or done? The only thing I can work out is line 84 is incorrect. I'm thinking it could need to be changed to:</p>
  
  <pre><code>&lt;%= render_navigation :context =&gt; (current_user.blank? ? :guest : :user : :seller : :buyer) %&gt;
  </code></pre>
  
  <p>When creating a new user they are not stored as a <code>Seller</code> by default and this is what confuses me.</p>
  
  <p>Does my change make sense or am I in the wrong location completely? </p>