I have a template that displays a list of events
<tbody> <%= render partial: 'event', collection: events, cached: true %> </tbody>
Partial event :
<% cache event do %> <tr> <td> Something </td> <td> <%= render 'identifiable_link_with_tag', identifiable: event.identifiable %> </td> </tr> <% end %>
Partial identifiable_link_with_tag :
<% cache identifiable do %> <span class="badge badge-info"><%= identifiable.type %></span> <%= link_to identifiable.identifier, identifiable %> <% end %>
Now it is strange what follows. Sometimes in the event view, I notice that for some events, instead of identifiable_link_with_tag , another identifiable_link_with_tag displayed: _identifiable . This seems very strange, and on a page containing 25 events, this will only happen for 1 or 2 or 3 (or 0) events.
In short, it seems that sometimes it is mistakenly identified. I use caching of Rails fragments, so this can be a factor. Am I missing something or encountering a Rails error? This question is very difficult to reproduce in the development process, so it is difficult to debug.
ruby-on-rails ruby-on-rails-5
edwardmp
source share