I am upgrading a 6.x app to 7.0.4
I am noticing that a couple of links which were POST-ing to to a controller are now using GET.
Both links use the link_to
method: :post
option.
The guide implies that Rails RJS has been replaced by Turbo.
( the link_to API documentation mentions that the method: option has been deprecated along with RJS )
I can see that adding data: {turbo_method: :post}
on the link initiates a post request - but it also uses fetch. I would not want to restructure my views to accommodate this. How can I have the RJS functionality back?
What I would like is for the link to submit with a post request to the controller.
I could replace these links with button_to, but if possible, Iād prefer to still use the link_to.