I have this code to generate a “unfollow” button via the ‘link_to’ function:
<%= link_to "Non seguire più", user_user_relationship_path(id:@relationship.id), remote: true, id: "follow_#{@user.id}", class:"btn btn-small btn-danger", method: :delete %>
I would like to know ho to use the “do..end” syntax with all those arguments.. Thanks!
You just skip the first parameter, can wrap the rest in parens, and then add the do/end.