I have this in my html.erb file:
<%= @pg_search_documents.each do |result| %>
<%= simple_format(result.content) %><br><br>
<% end %>
The output is the following:
nadja kuhn
Zwischen Nadja Dazwischen
[#<PgSearch::Document id: 17, content: "nadja kuhn", searchable_id: 122, searchable_type: "Event", created_at: "2016-03-18 22:45:02", updated_at: "2016-03-18 22:45:02">, #<PgSearch::Document id: 19, content: "Zwischen Nadja Dazwischen", searchable_id: 124, searchable_type: "Event", created_at: "2016-03-18 22:45:02", updated_at: "2016-03-18 22:45:02">]
The first two lines are printed as expected, but somehow, there comes more, than just the content, namely, the list with the whole entries.
If I write this:
<%= @pg_search_documents.each do |result| %>
The first two lines disappear, as expected, but somehow, there is still this list:
[#<PgSearch::Document id: 17, content: "nadja kuhn", searchable_id: 122, searchable_type: "Event", created_at: "2016-03-18 22:45:02", updated_at: "2016-03-18 22:45:02">, #<PgSearch::Document id: 19, content: "Zwischen Nadja Dazwischen", searchable_id: 124, searchable_type: "Event", created_at: "2016-03-18 22:45:02", updated_at: "2016-03-18 22:45:02">]
If I write nothing, then nothing happens. What do I need to do, that this second list doesn't get printed?