I am using rails3 and I have a user model. This model has a status column. I am showing admin following table
Mary approve reject
John approve reject
Both approve and reject are links. Since clicking on approve will approve user’s record it should not be a get request. It should be a post request. I was thinking to achieve a post request I should make clicking on approve or reject an ajax call.
In the ajax call I would make post call instead of get.
Is this a good strategy? Anyone has any better suggestion.
Thanks
Just pass
:method => 'post'to yourlink_tocall:http://api.rubyonrails.org/classes/ActionView/Helpers/UrlHelper.html#method-i-link_to