Sha256: 1bbb02ef3120cc95d75005178672e61f0a3d643c5909a839f69cdddf444b5442

Contents?: true

Size: 1.04 KB

Versions: 2

Compression:

Stored size: 1.04 KB

Contents

<%- model_class = resource_name.downcase.gsub('::', '') %>
<%%- model_class = <%= resource_name.classify %> -%>
<div class="page-header">
  <h1><%%=t '.title', default: <%= singular_table_name.titleize %> %></h1>
</div>

<dl class="dl-horizontal">
<%- attributes.each do |column| -%>
  <dt><strong><%%= model_class.human_attribute_name(:<%= column.name %>) %>:</strong></dt>
  <dd><%%= @<%= model_class %>.<%= column.name %> %></dd>
<%- end -%>
</dl>

<%%= link_to t('.back', default: t("helpers.links.back")),
              <%= controller_name %>_path, class: 'btn btn-outline-info'  %>
<%%= link_to t('.edit', default: t("helpers.links.edit")),
              edit_<%= model_class %>_path(@<%= model_class %>), class: 'btn btn-outline-dark' %>
<%%= link_to t('.destroy', default: t("helpers.links.destroy")),
              <%= model_class %>_path(@<%= model_class %>),
              method: 'delete',
              data: { confirm: t('.confirm', default: t("helpers.links.confirm", default: 'Are you sure?')) },
              class: 'btn btn-outline-danger' %>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
railsstrap-4.0.0.beta3 lib/generators/railsstrap/scaffold/templates/show.html.erb
railsstrap-4.0.0.beta2 lib/generators/railsstrap/scaffold/templates/show.html.erb