title: NoMethodError in RUBY ON RAILS
body: <p>Hi all I am new in Ruby on Rails and have this problem</p>
  
  <p>when I go to </p>
  
  <blockquote>
    <p>localhost/proyects</p>
  </blockquote>
  
  <p>This error is triggered</p>
  
  <pre><code>NoMethodError in Proyects#index 
  
  Showing /home/mariano/pepcode/starter_project/app/views/proyects/index.html.erb where       line #5 raised:
  
  undefined method `model_name' for NilClass:Class
  Extracted source (around line #5):
  
  2:   &lt;p&gt;Projects&lt;/p&gt;
  3: &lt;/header&gt;
  4: 
  5: &lt;%= render @projects %&gt;
  6: 
  7: &lt;br /&gt;
  This is 
  </code></pre>
  
  <p>This is the content of index.html.erb</p>
  
  <pre><code>&lt;header&gt;
   &lt;p&gt;Projects&lt;/p&gt;
  &lt;/header&gt;
  &lt;%= render @projects %&gt;
  &lt;br /&gt;
  
  and this is the content of the partial  _project.html.erb  which the  index view  points
  
   &lt;div class="project"&gt;
     &lt;h1&gt; &lt;%= project.title %&gt;&lt;/h1&gt;    
   &lt;/div&gt;
  </code></pre>
  
  <p>This is the code of Proyect Controller</p>
  
  <pre><code>class ProyectsController &lt; ApplicationController
    def index
     @proyects = Proyect.all
     respond_to do |format|
       format.html # index.html.erb
       format.xml  { render :xml =&gt; @proyects }
     end
    end
   end
  </code></pre>