Created
September 25, 2013 14:14
-
-
Save dasibre/6700242 to your computer and use it in GitHub Desktop.
javascript form button for each object
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#This is my player partial | |
.w-col.w-col-3.w-col-small-6 | |
= image_tag player.image_url.to_s | |
h4= player.full_name | |
= link_to "Pin", { controller: "pinboard_players", action: "new", id: player}, remote: true, class: "pinbutton #{player.full_name}" | |
player index | |
.section | |
.w-container | |
.w-row | |
- @players.each do |player| | |
= render "player", player: player | |
controller new.js | |
$('.pinbutton').hide().after('<%= j render("pinboard_select") %>') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ie, send the player id in the ajax request, then use $('.pinboard <%= some_unique_id %>').hide().after(...)