<%= link_to "Follow", { :controller => "friendship", :action => "follow",:id=> friend.id} , :remote => true, :class => "follow_user" %>
- How do I use ‘links’ to pass argument ‘id’ as a POST variable and not as a parameter in the URL?
- And then, How do I make ‘follow’ action in ‘friendship’ controller only accept POST variable so that nobody can use ‘http://localhost:3000/friendship/follow?id=8’ in the URL to perform the action?
method: :postto yourlink_tooptions.request.post?in your controller.