app/views/model_info/models/show.html.erb in model_info-0.0.6 vs app/views/model_info/models/show.html.erb in model_info-0.0.7
- old
+ new
@@ -1,19 +1,8 @@
-<h3>View Your <%= @model_class.name%> Data</h3>
-<table class="table table-hover table-bordered">
- <tr>
- <th>Attribute</th>
- <th>Value</th>
- </tr>
- <% @model_class.column_names.each do |model_column_name| %>
- <tr>
- <th><%= model_column_name %></th>
- <td><%= @model_data.send(model_column_name) %></td>
- </tr>
- <% end %>
- <tr>
- <th>Actions</th>
- <td>
- <%= link_to 'Back', :back %>
- </td>
- </tr>
-</table>
+<h3>View Your <%= @model_class %> Data</h3>
+<%= render partial: 'model_info/shared/show',
+ locals:
+ {
+ model_class: @model_class,
+ model_data: @model_data
+ }
+%>
\ No newline at end of file