programandoarg/pg_rails

View on GitHub
pg_scaffold/lib/generators/pg_slim/templates/show.html.slim

Summary

Maintainability
Test Coverage
- content_for :title do
  = @<%= singular_name %>.to_s
- content_for :actions do
  = @<%= singular_name %>.destroy_link_redirect
  .ms-1
  = @<%= singular_name %>.edit_link

table.table.table-borderless.table-sm.w-auto.mb-0.m-3
  - atributos_para_mostrar.each do |att|
    tr
      th = @clase_modelo.human_attribute_name(att)
      td = @<%= singular_name %>.send(att)
<%- if options[:trackeo_de_usuarios] -%>
  tr
    th = t('attributes.creado_por')
    td = @<%= singular_name %>.creado_por
<%- end -%>
  tr
    th = t('attributes.created_at')
    td = @<%= singular_name %>.created_at
<%- if options[:trackeo_de_usuarios] -%>
  tr
    th = t('attributes.actualizado_por')
    td = @<%= singular_name %>.actualizado_por
<%- end -%>
  tr
    th = t('attributes.updated_at')
    td = @<%= singular_name %>.updated_at
<%- if options[:paranoia] -%>
  tr
    th = t('attributes.deleted_at')
    td = @<%= singular_name %>.deleted_at
<%- end -%>
<%- if options[:discard] -%>
  tr
    th = t('attributes.discarded_at')
    td = @<%= singular_name %>.discarded_at
<%- end -%>