Show More
Commit Description:
remove unnecessary gems
Commit Description:
remove unnecessary gems
File last commit:
Show/Diff file:
Action:
app/views/application/_toggle_button.js.haml | 7 lines | 251 B | text/x-haml | HamlLexer |
* DRY the toggle button via application_helper.rb#toggle_button and _toggle_button.js.haml...
r562 :plain
var t = $("#{button_id}");
remove unnecessary gems
r872 t.removeClass('btn-outline-secondary');
* DRY the toggle button via application_helper.rb#toggle_button and _toggle_button.js.haml...
r562 t.removeClass('btn-success');
t.removeClass('btn-warning');
remove unnecessary gems
r872 t.addClass("btn-#{button_on ? 'success' : 'outline-secondary'}");
* DRY the toggle button via application_helper.rb#toggle_button and _toggle_button.js.haml...
r562 t.text("#{button_on ? 'Yes' : 'No'}");