link_to “<i class='fa fa-arrow-circle-left 2x'></i> Back to list”.html_safe, <%= path_helper_plural %>¶ ↑
turbo_frame_tag “<%= singular %>__#{<%= ”@“ + singular %>.id}” do¶ ↑
.cell.editable{style: "position: relative;"}
- if <%="@" + singular%>.errors.any?
= render(partial: "#{controller.namespace}errors", locals: {resource: <%="@" + singular%>})
Editing
- if <%="@" + singular%>.try(:to_label)
= <%="@" + singular%>.to_label
- elsif <%="@" + singular%>.try(:name)
= <%="@" + singular%>.name
- else
(no name)
= form_with model: <%= "@" + singular%>, url: <%= path_helper_singular %>(<%= path_arity %>) do |f|
= render partial: "form", locals: {:<%= singular %> => <%= "@" + singular%>, f: f}
%i.fa.fa-times-circle.fa-2x{ 'data-name' => 'close-invoice__#{@invoice.id}', 'data-row-id' => <%= "@" + singular %>.id, 'data-role' => 'close-button'}