Sha256: 5d79657d9fb63c3a23a94490bd2e9668444b700ecff21e2be53600ead2e1551b
Contents?: true
Size: 1.35 KB
Versions: 1
Compression:
Stored size: 1.35 KB
Contents
<h1>Listado de <%= plural_table_name.humanize %></h1> <%% if @<%= plural_table_name %>.any? %> <table> <thead> <tr> <%- attributes.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.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 %>, <%= key_value :method, ":delete" %>, <%= key_value :data, "{ #{key_value :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.5 | lib/templates/erb/scaffold/index.html.erb |