<%= object.hidden_field :number, class: "routine-number" %> <%= object.label :title, "Día #{counter}", class: "routine-title form-control-sm" %> <%= object.text_field :title, class: "form-control form-control-sm", placeholder: "Sesión #{counter}" %> <%= object.label :_destroy, data: { target: "routine-container-#{object.object.id}" }, class: "mb-0 btn btn-danger remove-routine input-group-prepend" do %> Eliminar <%= object.check_box :_destroy %> <% end %>
<% index = 0 %> <%= object.fields_for :routine_workouts do |rw| %> <%= render "plans/routines/workout_fields", child: rw, routine_id: object.object.id, idx: index %> <% index += 1 %> <% end %>
<%= object.select :workouts, Workout.select(:category, :group, :sub_group).distinct.map { |w| [group_category(w.group, w.sub_group, w.category), w.category] }, { include_blank: "Ejercicios:" }, class: "workout-selector form-control", data: { routine: object.object.id } %> S R Carga Nota