<% attributes.each do |attribute| -%> <% if attribute.password_digest? -%>
{#if $form.errors.password}
{$form.errors.password.join(', ')}
{/if}
{#if $form.errors.password_confirmation}
{$form.errors.password_confirmation.join(', ')}
{/if}
<% else -%>
<% if input_type(attribute) == "text_area" -%> <% elsif attribute.attachment? -%> ($form.<%= attribute.column_name %> = e.target.files[0])} /> <% elsif attribute.attachments? -%> ($form.<%= attribute.column_name %> = Array.from(e.target.files))} /> <% else -%> ={$form.<%= attribute.column_name %>} /> <% end -%> {#if $form.errors.<%= attribute.column_name %>}
{$form.errors.<%= attribute.column_name %>.join(', ')}
{/if}
<% end -%> <% end -%>