Skip to content

Instantly share code, notes, and snippets.

View mfitzhenry's full-sized avatar

Matt Fitz-Henry mfitzhenry

View GitHub Profile
@mfitzhenry
mfitzhenry / _post.html.erb
Created September 6, 2013 15:12
Hearts Controller Issue
<p>
<h2>
<div class="pull-right">
<%= form_for(Heart.new) do |f| %>
<% f.hidden_field :post_id, value: post.id %>
<%= f.submit "♥", class: 'btn btn-danger' %>
<% end %>
</div>
<%= link_to post.title, post %>