Sha256: c16c2813088512c906b29aa77f57b716f7225cde9159d55e3fa32ce901423274

Contents?: true

Size: 693 Bytes

Versions: 8

Compression:

Stored size: 693 Bytes

Contents

<%%= heading_with_title "<%= singular_table_name.camelize %>" %>
<%
  key = nil
  key = 'title' if attributes.any? {|x| x.name == 'title'}
  key = 'name'  if attributes.any? {|x| x.name == 'name'}
%>
<ul id="<%= plural_table_name %>-list">
<%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %>
<% if ['title', 'name'].include?(key) -%>
  <li><%%= link_to <%= singular_table_name %>.<%= key %>, <%= singular_table_name %> %></li>
<% else -%>
  <li><%%= link_to 'Show', <%= singular_table_name %> %></li>
<% end -%>
<%% end %>
</ul>

<%%= private_area true do %>
  <ul>
    <li><%%= link_to 'New <%= human_name %>', new_<%= singular_table_name %>_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/index.html.erb
playmo-0.1.9 lib/generators/templates/erb/scaffold/index.html.erb
playmo-0.1.8 lib/generators/templates/erb/scaffold/index.html.erb
playmo-0.1.7 lib/generators/templates/erb/scaffold/index.html.erb
playmo-0.1.6 lib/generators/templates/erb/scaffold/index.html.erb
playmo-0.1.5 lib/generators/templates/erb/scaffold/index.html.erb
playmo-0.1.4 lib/generators/templates/erb/scaffold/index.html.erb
playmo-0.1.3 lib/generators/templates/erb/scaffold/index.html.erb