It is easier than you think. These methods are Rails helpers and have nothing to do with haml. Yes, one method for get and another for post methods. If you need to send any data to the controller, use button_to (for example, when deleting a record). Otherwise link_to enough.
Alternatively, you can do link_to data placement using the :method parameter:
= link_to "Something", some_path, :method => :post
When answering your question, use link_to .
methyl
source share