Skip to content

Commit

Permalink
Merge show.
Browse files Browse the repository at this point in the history
  • Loading branch information
mjy committed Sep 17, 2014
2 parents aba2c94 + 379ace1 commit 7784993
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 0 additions & 2 deletions app/views/serials/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<th>Name</th>
<th>Created by</th>
<th>Updated by</th>
<th>Project</th>
<th>Publisher</th>
<th>Place published</th>
<th>Primary language</th>
Expand All @@ -24,7 +23,6 @@
<td><%= serial.name %></td>
<td><%= serial.created_by_id %></td>
<td><%= serial.updated_by_id %></td>
<td><%= serial.project_id %></td>
<td><%= serial.publisher %></td>
<td><%= serial.place_published %></td>
<td><%= serial.primary_language_id %></td>
Expand Down
6 changes: 3 additions & 3 deletions app/views/shared/data/_show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@
<% object.class.reflect_on_all_associations(:has_one).sort { |a, b| a.name <=> b.name }.each do |r| -%>
<%= r.name.to_s.humanize -%>
<%= content_tag(:strong, object_tag(object.send(r.name.to_s))) -%>
<br>
<br>
<% end %>
<h3> Belongs to </h3>
<% object.class.reflect_on_all_associations(:belongs_to).sort { |a, b| a.name <=> b.name }.each do |r| -%>
<%= r.name.to_s.humanize -%>
<%= content_tag(:strong, object_tag(object.send(r.name.to_s))) -%>
<br>
<% end %>
<br>
<% end %>


</div>
Expand Down
2 changes: 1 addition & 1 deletion spec/factories/serial_factory.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FactoryGirl.define do
factory :serial, traits: [:creator_and_updater] do
factory :valid_serial do
name { 'Serial 1' + Faker::Lorem.sentence }
name { 'Serial 1 ' + Faker::Lorem.sentence }
end

factory :preceding_serial do
Expand Down

0 comments on commit 7784993

Please sign in to comment.