app/presenters/hyrax/fixity_status_presenter.rb in hyrax-2.0.3 vs app/presenters/hyrax/fixity_status_presenter.rb in hyrax-2.1.0.beta1

- old
+ new

@@ -8,11 +8,11 @@ class FixityStatusPresenter include ActionView::Helpers::TagHelper include ActionView::Helpers::TextHelper include ActionView::Helpers::OutputSafetyHelper - attr_reader :file_set_id, :relevant_log_records + attr_reader :file_set_id # Note this takes a file_set_id NOT a FileSet, easy use from either solr # or AF object. def initialize(file_set_id) @file_set_id = file_set_id end @@ -73,10 +73,10 @@ end # Should be all _latest_ ChecksumAuditLog about different files/versions # currently existing in specified FileSet. def relevant_log_records - @relevant_log_records = ChecksumAuditLog.latest_for_file_set_id(file_set_id) + @relevant_log_records ||= ChecksumAuditLog.latest_for_file_set_id(file_set_id) end def num_checked_files @num_relevant_files ||= relevant_log_records.group_by(&:file_id).keys.count end