I am trying to create a button that, when clicked on, calls a method
in a controller then changes the image on the button without a page
load. I was thinking that button_to_function might be a good
contender for this but I don’t yet know how to make it talk to a
controller, and on success change the image of the button. Can anyone
help me out with this problem?