<%# Props: nutrient_profiles: ActiveRecord::Relation %> <%# Fallback if controller didn't set @nutrient_profiles yet %> <% profiles = (local_assigns[:nutrient_profiles] || []).presence || [] %> <%# We'll render a form purely for structure (no real submit yet) %> <%= form_with url: "#", method: :post, local: true, html: { id: "np-mix-form", "data-controller": "np-mix" } do %>
Choisissez des profils de croissance et répartissez-les pour totaliser 100%.
Somme : 0%
<%# Rows are injected by JS from the template below, including defaults %>
<%# Placeholder "save" button for later backend wiring; disabled until total == 100 %>
<%# --- Hidden template for a single row --- %> <%# --- Defaults to inject on load --- %> <%# --- Tiny inline JS to keep this self-contained (no Stimulus required) --- %> <% end %>