Skip to content

Commit 12bed26

Browse files
Switched to disable_with over turbo_submits_with since turbo is disabled on the majority of controllers
1 parent c416c5a commit 12bed26

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/helpers/ui_helper.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def print_button_to(link, options = {})
135135
# Generic Submit button for a form
136136
def submit_button(options = {}, data = {})
137137
disable_text = options[:disable_text] || "Saving"
138-
_button_to({ text: "Save", icon: "floppy-o", type: "success", align: "pull-right" }.merge(options), data: { turbo_submits_with: disable_text }.merge(data), name: options[:name] || 'button')
138+
_button_to({ text: "Save", icon: "floppy-o", type: "success", align: "pull-right" }.merge(options), data: { disable_with: disable_text }.merge(data), name: options[:name] || 'button')
139139
end
140140

141141
# Like above, but POSTs to a URL instead of to a form
@@ -193,7 +193,7 @@ def _button_to(options = {}, properties = {})
193193
align = options[:align]
194194

195195
properties[:data] ||= {}
196-
properties[:data][:turbo_submits_with] ||= "Please wait..."
196+
properties[:data][:disable_with] ||= "Please wait..."
197197

198198
button_tag({ type: submit_type, id: id, class: "btn btn-#{type} btn-#{size} #{align}" }.merge(properties)) do
199199
fa_icon icon, text: text

0 commit comments

Comments
 (0)