<%= form_for(macho, :url => { :action => action }, html: { class: "row" }) do |f| %> <%= render "admin/shared/errors", object: macho %> <%= f.hidden_field :plan_id %> <%= f.hidden_field :tipo %>
<%= f.label :title, "Nombre de la #{t(macho.tipo.to_sym)}" %> <%= f.text_field :title, autofocus: true, class: "form-control" %>
<% if f.object.persisted? %> <%= link_to macho_path(macho), class: "btn btn-outline-danger btn-sm float-right mt-2 mb-2", method: :delete, data: { confirm: "¿Estás seguro de eliminar este #{t(:macho)}?" } do %> <%= t(:delete) %> <% end %> <% end %>
<% end %>