lib/templates/erb/scaffold/index.html.erb in rieles-0.0.5 vs lib/templates/erb/scaffold/index.html.erb in rieles-0.0.6

- old
+ new

@@ -2,11 +2,11 @@ <%% if @<%= plural_table_name %>.any? %> <table> <thead> <tr> -<%- attributes.each do |attribute| -%> +<%- attributes.reject(&:password_digest?).each do |attribute| -%> <th><%= attribute.human_name %></th> <%- end -%> <th></th> <th></th> <th></th> @@ -14,20 +14,20 @@ </thead> <tbody> <%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %> <tr> -<%- attributes.each do |attribute| -%> +<%- 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 %>, <%= key_value :method, ":delete" %>, <%= key_value :data, "{ #{key_value :confirm, "'¿Estás seguro?'"} }" %> %></td> + <td><%%= link_to 'Eliminar', <%= singular_table_name %>, method: :delete, data: { confirm: '¿Estás seguro?' } %></td> </tr> <%% end %> </tbody> </table> <%% else %> @@ -36,6 +36,6 @@ </div> <%% end %> <br /> <%- nuevo_str = (singular_table_name.split('_').first =~ /[ad]$/) ? 'Nueva' : 'Nuevo' -%> -<%%= link_to "<%= nuevo_str %> <%= human_name %>", new_<%= singular_table_name %>_path %> +<%%= link_to <%= %{"#{nuevo_str} #{human_name}", new_#{singular_table_name}_path} %> %>