Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%= link_to "Accept", accept_candidate_path(vacancy_id: @vacancy.id, employee_id: e.id), method: :post, :remote => true, :id => "link_#{i}" %>
- <%= link_to "Cancel", back_to_pending_path(vacancy_id: @vacancy.id, employee_id: e.id), method: :post, :remote => true%>
- $("[id^='link_']").click(function (event) {
- $(this).replaceWith("Accepted")
- });
- # back_to_pending.js
- $("[id^='link_']").html("<%= escape_javascript(render('cancel_link')) %>")
- # cancel_link.html.erb
- <%= link_to "Cancel", back_to_pending_path(vacancy_id: @vacancy.id, employee_id: e.id), method: :post, :remote => true%>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement