Sha256: eaf7ce9c6b4568de1c94acc2a7042b49e3afdee28458421b0545ca97d762cf2e

Contents?: true

Size: 904 Bytes

Versions: 8

Compression:

Stored size: 904 Bytes

Contents

<%
  key = nil
  key = 'title' if attributes.any? {|x| x.name == 'title'}
  key = 'name'  if attributes.any? {|x| x.name == 'name'}
-%>
<div id="<%= singular_table_name %>">
<% if ['title', 'name'].include?(key) -%>
  <%%= heading_with_title @<%= singular_table_name %>.<%= key %> %>
<% else -%>
  <%%= heading_with_title "<%= singular_table_name.camelize %>" %>
<% end -%>
  
  <dl>
  <% if attributes.any? -%>
    <% attributes.each do |attribute| %>
    <dt><%= attribute.human_name %>:</dt>
    <dd><%%= @<%= singular_table_name %>.<%= attribute.name %> %></dd>
    <% end -%>
  <% else %>
    <dt>Attribute Name:</dt>
    <dd>Attribute Value</dd>
  <% end %>  
  </dl>
  
</div>

<%%= private_area true do %>
  <ul>
    <li><%%= link_to 'Edit', edit_<%= singular_table_name %>_path(@<%= singular_table_name %>) %></li>
    <li><%%= link_to 'Back', <%= index_helper %>_path %></li>
  </ul>
<%% end %>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
playmo-0.1.10 lib/generators/templates/erb/scaffold/show.html.erb
playmo-0.1.9 lib/generators/templates/erb/scaffold/show.html.erb
playmo-0.1.8 lib/generators/templates/erb/scaffold/show.html.erb
playmo-0.1.7 lib/generators/templates/erb/scaffold/show.html.erb
playmo-0.1.6 lib/generators/templates/erb/scaffold/show.html.erb
playmo-0.1.5 lib/generators/templates/erb/scaffold/show.html.erb
playmo-0.1.4 lib/generators/templates/erb/scaffold/show.html.erb
playmo-0.1.3 lib/generators/templates/erb/scaffold/show.html.erb