uses a journal cache to render the history

See the comment for some details.

We should think about moving this into a different place like the
controller or the User.current. Doing so would provide us with a request
cache that can be reused for multiple purposes.

However this might cause serious memory issues.
pull/26/head
Jens Ulferts 12 years ago
parent 89db6011e8
commit e61b9b1351
  1. 13
      app/views/issues/_history.rhtml

@ -1,6 +1,15 @@
<%# Uses a cache to render the history. The placeing of this object
is somewhat arbitrary. The important point is that it is not instantiated within
a journal as the cache could then not be used between all of an issue's journals. %>
<% @journal_cache = Acts::Journalized::JournalObjectCache.new %>
<% for journal in journals %>
<%= render_journal issue, journal, :edit_permission => :edit_issue_notes,
:edit_own_permission => :edit_own_issue_notes %>
<%= render_journal issue,
journal,
:edit_permission => :edit_issue_notes,
:edit_own_permission => :edit_own_issue_notes,
:cache => @journal_cache %>
<%= call_hook(:view_issues_history_journal_bottom, { :journal => journal }) %>
<% end %>

Loading…
Cancel
Save