Sha256: c8613707eb9906eb95cfd5ca35e2e9ecb76d607d828a29ebb236e89037277e85

Contents?: true

Size: 897 Bytes

Versions: 5

Compression:

Stored size: 897 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>

<%%= admin_area 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

5 entries across 5 versions & 1 rubygems

Version Path
playmo-0.1.2 lib/generators/templates/erb/scaffold/show.html.erb
playmo-0.1.1 lib/generators/templates/erb/scaffold/show.html.erb
playmo-0.1.0 lib/generators/templates/erb/scaffold/show.html.erb
playmo-0.0.18 lib/generators/templates/erb/scaffold/show.html.erb
playmo-0.0.17 lib/generators/templates/erb/scaffold/show.html.erb