lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb in bootswatch_rails-3.2.0.10 vs lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb in bootswatch_rails-3.2.0.11
- old
+ new
@@ -3,11 +3,15 @@
<table class="table table-striped table-hover">
<tbody>
<% attributes.each do |attribute| -%>
<tr>
<td>
+ <%- if [ "created_by", "updated_by" ].include? attribute.name -%>
+ <%%= t('activerecord.attributes.<%= attribute.name %>') %>
+ <%- else -%>
<%%= t('activerecord.attributes.<%= singular_table_name %>.<%= attribute.name %>') %>
+ <%- end -%>
</td>
<td>
<%- if attribute.name.include?("picture") -%>
<p>
<%%= link_to "TODO: Anzeigen in Originalgröße", '#' %>
@@ -15,9 +19,13 @@
<%%= image_tag(@<%= singular_table_name %>.<%= attribute.name %>_url(:display)) %>
<%- elsif attribute.type == :boolean -%>
<%%= @<%= singular_table_name %>.<%= attribute.name %> ? t('simple_form.yes') : t('simple_form.no') %>
<%- elsif attribute.type == :belongs_to -%>
<%%= @<%= singular_table_name %>.<%= attribute.name %>.name %>
+ <%- elsif attribute.name == "created_by" -%>
+ <%%= raw(text_created_by(@<%= singular_table_name %>, "create")) %>
+ <%- elsif attribute.name == "updated_by" -%>
+ <%%= raw(text_created_by(@<%= singular_table_name %>, "update")) %>
<%- else -%>
<%%= @<%= singular_table_name %>.<%= attribute.name %> %>
<%- end -%>
</td>
</tr>