lib/ddr/models/fixity_checkable.rb in ddr-models-1.15.0 vs lib/ddr/models/fixity_checkable.rb in ddr-models-1.16.0
- old
+ new
@@ -13,8 +13,20 @@
# Returns a Ddr::Actions::FixityCheck::Result for the object
def fixity_check
Ddr::Actions::FixityCheck.execute(self)
end
+ def last_fixity_check
+ fixity_checks.last
+ end
+
+ def last_fixity_check_on
+ last_fixity_check && last_fixity_check.event_date_time
+ end
+
+ def last_fixity_check_outcome
+ last_fixity_check && last_fixity_check.outcome
+ end
+
end
end
end