= link_to("Paint orange", Car.find_by(user_id: current_user.id,
acquaintance_id: user.id),
method: :patch,
remote: true, class: "btn btn-default")
This makes a link with href:
I'd like to add two url parameters to this link
http://localhost/cars/175?action=paint&color=orange
Is it possible?
You will need to use the explicit path generation, using
car_path:Note that I also replaced
actionwithtask.actionis reserved by Rails for the internal router, therefore you can't pass a parameter calledactionor it will conflict with the router.