lib/scaffolds/views/_resource.html.haml in effective_developer-0.0.10 vs lib/scaffolds/views/_resource.html.haml in effective_developer-0.1.1
- old
+ new
@@ -1,7 +1,12 @@
%table.table
%tbody
-<% for attribute in attributes -%>
+<% resource.belong_tos.each do |reference| -%>
%tr
- %th <%= attribute.human_name %>
- %td= <%= singular_name %>.<%= attribute.name %>
+ %th <%= reference.name.to_s.titleize %>
+ %td= <%= resource.name %>.<%= reference.name %>
+<% end %>
+<% attributes.each do |attribute| -%>
+ %tr
+ %th <%= attribute.name.titleize %>
+ %td= <%= resource.name %>.<%= attribute.name %>
<% end %>