Skip to content

Instantly share code, notes, and snippets.

@emskaplann
Created October 28, 2019 23:47
Show Gist options
  • Save emskaplann/44ffc7c4dcf43317000304e9acfb73ad to your computer and use it in GitHub Desktop.
Save emskaplann/44ffc7c4dcf43317000304e9acfb73ad to your computer and use it in GitHub Desktop.
<%= form_with model: @like, url: create_like_path, class: "float-right", remote: true do |f| %>
<%= f.hidden_field :user_id, value: session[:user_id] %>
<%= f.hidden_field :post_id, value: post.id %>
<%= f.submit "", :type => :image, :src => "images/upvote2.png", :class => "limg#{post.id} float-right" %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment