Reputation: 31
I'm using Ruby on Rails to make a web app that allows the user to select items then export a file for download. However, after exporting once, the submit_tag button is disabled and would require a refresh.
Is it possible to keep the button enabled or re-enabled it after it's clicked? Thank you!
Upvotes: 0
Views: 366
Reputation: 2695
In application.rb you can tell Rails to not disable submit tags with
config.action_view.automatically_disable_submit_tag = false
Or, for just that particular submit tag you can add this to your submit_tag...
data: { disable_with: false }
Upvotes: 1