Sha256: bc6b05c8eca51c2a017bc8a411c70b41d36797a8ead7c13a9bdb6f9aa9cbc1a2
Contents?: true
Size: 1.31 KB
Versions: 1
Compression:
Stored size: 1.31 KB
Contents
%h1 Listado de <%%= plural_table_name.humanize %> %table %thead %tr <%%- attributes.each do |attribute| -%> %th <%%= attribute.human_name %> <%%- end -%> %th %th %th %tbody - @<%%= plural_table_name %>.each do |<%%= singular_table_name %>| %tr <%%- attributes.each do |attribute| -%> %td= <%%= singular_table_name %>.<%%= attribute.name %> <%%- end -%> <%%- if options.cancan? -%> %td= link_to 'Mostrar', <%%= singular_table_name %> if can? :read, @<%%= singular_table_name %> %td= link_to 'Editar', edit_<%%= singular_table_name %>_path(<%%= singular_table_name %>) if can? :update, @<%%= singular_table_name %> %td= link_to 'Eliminar', <%%= singular_table_name %>, :confirm => '¿Está usted seguro?', :method => :delete if can? :destroy, @<%%= singular_table_name %> <%%- else -%> %td= link_to 'Mostrar', <%%= singular_table_name %> %td= link_to 'Editar', edit_<%%= singular_table_name %>_path(<%%= singular_table_name %>) %td= link_to 'Eliminar', <%%= singular_table_name %>, :confirm => '¿Está usted seguro?', :method => :delete <%%- end -%> %br <%% nuevo = singular_table_name.split('_').first.ends_with?("a") ? 'Nueva' : 'Nuevo' -%> = link_to '<%%= nuevo %> <%%= human_name %>', new_<%%= singular_table_name %>_path
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
lbs-config-0.0.2 | lib/generators/lbs/install/templates/index.html.haml |