Sha256: bcf9e2dc321b56451e6c4d9b65078caec53e26039c4b9ca4394815b05cf7f448

Contents?: true

Size: 961 Bytes

Versions: 1

Compression:

Stored size: 961 Bytes

Contents

<% for attribute in attributes -%>
<p>
  <b><%= attribute.column.human_name %>:</b>
  <%%=h @<%= singular_name %>.<%= attribute.name %> %>
</p>

<% end -%>
<% has_many_through_models.each do |hmt_model| -%>
<%% @<%= singular_name %>.<%= hmt_model.through_model.name.underscore.pluralize %>.each do |<%= hmt_model.through_model.name.underscore %>| %>
  <div class="child">
<% for attribute in hmt_model.through_model.attributes -%>
    <p>
      <b><%= hmt_model.through_model.name %> <%= attribute.column.human_name %>:</b>
      <%%=h <%= hmt_model.through_model.name.underscore%>.<%= attribute.name %> %>
    </p>
<% end -%>
    <p>
      <b><%= hmt_model.name %>:</b>
      <%%=h <%= hmt_model.through_model.name.underscore%>.<%= hmt_model.name.underscore%>_<%= field_for(hmt_model) %> %>
    </p>
  </div>
<%% end %>

<% end -%>
<%%= link_to 'Edit', edit_<%= singular_name %>_path(@<%= singular_name %>) %> |
<%%= link_to 'Back', <%= plural_name %>_path %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
view_mapper-0.3.4 lib/view_mapper/views/has_many_existing/templates/view_show.html.erb