If your button is part of a form, you can keep its functionality the same as it is now. If it's stand-alone, you'll be best using button_to
like so:
<%= button_to "Download", post_path, id: "button" %> # -> uses POST http verb, so will send to create action
What you're asking is best answered with unobtrusive javascript
. This will bind your button's click
event to a function of your choice, allowing you to not only submit the required data, but handle the other functionality you need too:
#app/assets/javascripts/application.js
$("#button").on("click", function(){
ExtInstall(); //do you have any references for this function?
});