Sha256: e012ad31362f514f467eec7dabffdeab065a88da634bb3bdb916a968e3993080

Contents?: true

Size: 1.52 KB

Versions: 48

Compression:

Stored size: 1.52 KB

Contents

<div class="col-sm-8 col-md-6 col-sm-offset-2 col-md-offset-3">
  <div class="panel panel-primary">
    <div class="panel-heading">
      <h4 class="panel-title">
        <%= singular_table_name.titleize %>
      </h4>
    </div>
    <div class="panel-body">
    <%- attributes.reject(&:password_digest?).each do |attribute| -%>
      <div class="row">
        <div class="col-sm-6 col-md-4">
          <strong><%= attribute.human_name %>:</strong>
        </div>
        <div class="col-sm-6 col-md-8">
          <%- if attribute.type == :boolean -%>
          <%%= @<%= singular_table_name %>.<%= attribute.name %> ? 'Yes' : 'No' %>
          <%- elsif attribute.type == :integer -%>
          <%%= @<%= singular_table_name %>.<%= attribute.name %> ? number_with_delimiter(@<%= singular_table_name %>.<%= attribute.name %>) : '0' %>
          <%- elsif attribute.type == :float -%>
          <%%= @<%= singular_table_name %>.<%= attribute.name %> ? number_with_precision(@<%= singular_table_name %>.<%= attribute.name %>, delimiter: ',', precision: 2) : '0' %>
          <%- elsif attribute.type == :datetime -%>
          <%%= @<%= singular_table_name %>.<%= attribute.name %> ? @<%= singular_table_name %>.<%= attribute.name %>.strftime('%m/%d/%Y') : '[Invalid Date]'  %>
          <%- else -%>
          <%%= @<%= singular_table_name %>.<%= attribute.name %> %>
          <%- end -%>
        </div>
      </div>
    <%- end -%>
      <br>
      <%%= link_to 'Cancel', <%= index_helper %>_path, class: 'btn btn-default' %>
    </div>
  </div>
</div>

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
incline-0.2.26 lib/templates/erb/scaffold/show.html.erb
incline-0.2.25 lib/templates/erb/scaffold/show.html.erb
incline-0.2.24 lib/templates/erb/scaffold/show.html.erb
incline-0.2.23 lib/templates/erb/scaffold/show.html.erb
incline-0.2.22 lib/templates/erb/scaffold/show.html.erb
incline-0.2.21 lib/templates/erb/scaffold/show.html.erb
incline-0.2.20 lib/templates/erb/scaffold/show.html.erb
incline-0.2.19 lib/templates/erb/scaffold/show.html.erb
incline-0.2.18 lib/templates/erb/scaffold/show.html.erb
incline-0.2.17 lib/templates/erb/scaffold/show.html.erb
incline-0.2.16 lib/templates/erb/scaffold/show.html.erb
incline-0.2.15 lib/templates/erb/scaffold/show.html.erb
incline-0.2.14 lib/templates/erb/scaffold/show.html.erb
incline-0.2.13 lib/templates/erb/scaffold/show.html.erb
incline-0.2.12 lib/templates/erb/scaffold/show.html.erb
incline-0.2.11 lib/templates/erb/scaffold/show.html.erb
incline-0.2.10 lib/templates/erb/scaffold/show.html.erb
incline-0.2.9 lib/templates/erb/scaffold/show.html.erb
incline-0.2.8 lib/templates/erb/scaffold/show.html.erb
incline-0.2.7 lib/templates/erb/scaffold/show.html.erb