button_tag is completely optional. You can just as easily edit the tag in html as follows:
<button class="button" type="submit" data-disable-with="Processing"> <%= image_tag("web-app-theme/icons/tick.png", :alt => "#{t("web-app-theme.save", :default => "Save")}") %> <%= t("web-app-theme.save", :default => "Save") %> </button>
All that does :disable_with is to add the data-disable-with attribute to the element. Then jquery-rails gem javascript (jquery_ujs.js) does the rest of the disconnect work.
This assumes, of course, that you are on rails 3.0 or higher.
source share