Skip to content

Instantly share code, notes, and snippets.

@luc4leone
Last active August 29, 2015 14:02
Show Gist options
  • Save luc4leone/b5e06ff68d79e9ff20a7 to your computer and use it in GitHub Desktop.
Save luc4leone/b5e06ff68d79e9ff20a7 to your computer and use it in GitHub Desktop.
<h1>New Post</h1>
<div class="row">
- <div class="col-md-6">
+ <div class="col-md-4">
<p>Guidelines for posts</p>
<ul>
<li>Make sure the it rhymes.</li>
<li>Don't use the letter "A".</li>
<li>The incessant use of hashtags will get you banned.</li>
</ul>
</div>
- <div class="col-md-6">
+ <div class="col-md-8">
- <%= form_for [@topic, @post] do |f| %>
- <div class="form-group">
- <%= f.label :title %>
- <%= f.text_field :title, class: 'form-control', placeholder: "Enter post title" %>
- </div>
- <div class="form-group">
- <%= f.label :body %>
- <%= f.text_area :body, rows: 8, class: 'form-control', placeholder: "Enter post body" %>
- </div>
- <div class="form-group">
- <%= f.submit "Save", class: 'btn btn-success' %>
- </div>
- <% end %>
+ <%= render partial: 'form', locals: { topic: @topic, post: @post } %>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment