כיצד להריץ קוד בצד השרת בלחיצה על כפתור?

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