title: Rails partials: What am I doing wrong?
body: <p>So, I have this code in a partial called <strong>"_form.html.erb" in "app/views/posts"</strong>:</p>
  
  <pre><code>&lt;%= form_for @post do |f| %&gt;
      &lt;% if @post.errors.any? %&gt;
          &lt;h2&gt;Errores:&lt;/h2&gt;   
          &lt;ul&gt;
              &lt;% @post.errors.full_messages.each do |message| %&gt;
                  &lt;li&gt;&lt;%= message %&gt;&lt;/li&gt;
              &lt;% end %&gt;
          &lt;/ul&gt;
      &lt;% end %&gt;
  &lt;p&gt;
      &lt;%= f.label :title %&gt;&lt;br /&gt;
      &lt;%= f.text_field :title %&gt;&lt;br /&gt;
  &lt;br /&gt;
      &lt;%= f.label :content %&gt;&lt;br /&gt;
      &lt;%= f.text_area :content %&gt;
  &lt;/p&gt;
  </code></pre>
  
  <p>And I have two views with this code:</p>
  
  <p><strong>"app/views/posts/new.html.erb"</strong></p>
  
  <pre><code>&lt;h1&gt;Nuevo post&lt;/h1&gt;
  
      &lt;%= render 'form' %&gt;
  
  &lt;p&gt;
      &lt;%= f.submit "Agregar Nuevo Post" %&gt;
  &lt;/p&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p><strong>"app/views/posts/edit.html.erb"</strong></p>
  
  <pre><code>&lt;h1&gt;Editar Post&lt;/h1&gt;
  
      &lt;%= render 'form' %&gt;
  
  &lt;p&gt;
      &lt;%= f.submit "Actualizar Post" %&gt;
  &lt;/p&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>What I want is the form to render in the views, but with the code I have shown to you I'm getting this error output in the server:</p>
  
  <pre><code>SyntaxError in Posts#new
  
  Showing /home/levick/rubyblog/app/views/posts/new.html.erb where line #10 raised:
  
  /home/levick/rubyblog/app/views/posts/new.html.erb:10: syntax error, unexpected keyword_ensure, expecting $end
  Extracted source (around line #10):
  
  7: &lt;/p&gt;
  8: &lt;% end %&gt;
  Trace of template inclusion: app/views/posts/new.html.erb
  
  Rails.root: /home/levick/rubyblog
  
  Application Trace | Framework Trace | Full Trace
  Request
  
  Parameters:
  
  None
  Show session dump
  
  Show env dump
  
  Response
  
  Headers:
  
  None
  </code></pre>
  
  <p>The same with the edit view.</p>
  
  <p><strong>My Question is:</strong> What did I do wrong?</p>
  
  <p>Thanks!</p>