Sha256: 3c75ce638b7b3f53031cd0ef9b4807511520eed23b3c52af7b850191fe376e46
Contents?: true
Size: 1.31 KB
Versions: 2
Compression:
Stored size: 1.31 KB
Contents
- model_class = <%= resource_name.classify %> .page-header %h1=t '.title', default: model_class.model_name.human.pluralize.titleize %table.table.table-striped %thead %tr %th= model_class.human_attribute_name(:id) <%- attributes.each do |column| -%> %th= model_class.human_attribute_name(:<%= column.name %>) <%- end -%> %th= model_class.human_attribute_name(:created_at) %th=t '.actions', default: t("helpers.actions") %tbody - @<%= plural_resource_name %>.each do |<%= resource_name %>| %tr %td= link_to <%= resource_name %>.id, <%= singular_name %>_path(<%= resource_name %>) <%- attributes.each do |column| -%> %td= <%= resource_name %>.<%= column.name %> <%- end -%> %td=l <%= resource_name %>.created_at %td = link_to t('.edit', default: t("helpers.links.edit")), edit_<%= singular_name %>_path(<%= resource_name %>), class: 'btn btn-primary btn-xs' = link_to t('.destroy', default: t("helpers.links.destroy")), <%= singular_name %>_path(<%= resource_name %>), method: :delete, data: { confirm: t('.confirm', default: t("helpers.links.confirm", default: 'Are you sure?')) }, class: 'btn btn-xs btn-danger' = link_to t('.new', default: t("helpers.links.new")), new_<%= singular_name %>_path, class: 'btn btn-primary'
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
railsstrap-4.0.0.beta3 | lib/generators/railsstrap/scaffold/templates/index.html.haml |
railsstrap-4.0.0.beta2 | lib/generators/railsstrap/scaffold/templates/index.html.haml |