I have a report model which accepts nested attributes for executive model.
class Report < ApplicationRecord has_many :executives accepts_nested_attributes_for :executives, reject_if: :all_blank, allow_destroy: true end
When I render these attributes on my show page:
<%= @report.executives.each do |executive| %> <tr> <td><%= executive.project_name %></td> <td><%= executive.project_number %></td> <td><%= executive.potential_impact %></td> <td><%= executive.date %></td> </tr> <% end %>
It also displays an array of all the other created attributes together with their timestamps, which I don’t want rendered on the show page.
How do I get rid of this?