Hoe voer ik server-side code uit bij het klikken op een knop?

I am not familiar to rails. Can you show me the command to delete posts for that user