I have a view with link_to method like this :
= link_to "Add Friend", friendships_path(:id => @user), :method => :post, :remote => true
As you can see I want to send a post request with link_to using ajax (remote: true).
This request go to the create method in friendships controller and it work fine (it create a relationship) but it render anything (firebug show me: 500 Internal Server Error).
views/friendships/create.js.erb
$("#my_selector").html("<%= escape_javascript(render('users/cancel_invitation')) %>")
views/users/cancel_invitation
= link_to "Cancel request", { :controller => "friendships", :action => "cancel", :id => @user }, data: { confirm: "Cancel friendship request?" }
I can't find the error.