Hi, I am trying to change the following:
.form-group
= label_tag :metric, 'Metric', class: 'sr-only'
= select_tag :metric, options_for_select(Report::METRICS, selected: @report.metric), class: 'form-control'
like that:
.form-group.pull-left
= label_tag :metric, 'Metric', class: 'sr-only'
.btn-group{"data-toggle" => "buttons"}
%label.btn.btn-default.active
%input
Value1
%label.btn.btn-default
%input
Value2
However, the problem is that when I submit the form, it does not actually pass the value of the switch. Also, after it is sent, by default it does not return to selection if it should remain on the selected switch.
source
share