Sha256: 69b66bae072f485d9a85a823c839e22b1c5b7b78679243a13c7084e3e1662ef7
Contents?: true
Size: 1.34 KB
Versions: 1
Compression:
Stored size: 1.34 KB
Contents
<h1>Listado de <%= plural_table_name.humanize %></h1> <%% if @<%= plural_table_name %>.any? %> <table> <thead> <tr> <%- attributes.reject(&:password_digest?).each do |attribute| -%> <th><%= attribute.human_name %></th> <%- end -%> <th></th> <th></th> <th></th> </tr> </thead> <tbody> <%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %> <tr> <%- attributes.reject(&:password_digest?).each do |attribute| -%> <%- if attribute.type == :integer or attribute.type == :decimal -%> <td><%%= number_with_delimiter <%= singular_table_name %>.<%= attribute.name %> %></td> <%- else -%> <td><%%= <%= singular_table_name %>.<%= attribute.name %> %></td> <%- end -%> <%- end -%> <td><%%= link_to 'Mostrar', <%= singular_table_name %> %></td> <td><%%= link_to 'Editar', edit_<%= singular_table_name %>_path(<%= singular_table_name %>) %></td> <td><%%= link_to 'Eliminar', <%= singular_table_name %>, method: :delete, data: { confirm: '¿Estás seguro?' } %></td> </tr> <%% end %> </tbody> </table> <%% else %> <div> <h3>No se encontraron <%= plural_table_name.humanize %></h3> </div> <%% end %> <br /> <%- nuevo_str = (singular_table_name.split('_').first =~ /[ad]$/) ? 'Nueva' : 'Nuevo' -%> <%%= link_to <%= %{"#{nuevo_str} #{human_name}", new_#{singular_table_name}_path} %> %>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rieles-0.0.6 | lib/templates/erb/scaffold/index.html.erb |