app/models/digital_asset.rb in daengine-0.3.7.5 vs app/models/digital_asset.rb in daengine-0.3.7.7
- old
+ new
@@ -69,10 +69,18 @@
def self.bulk_processed?
(stale.count.to_f / self.count) <= 0.05
end
+ def path_is(path)
+ documents.where(path: path).first
+ end
+
+ def doc_changed_at(path)
+ path_is(path).try(:doc_changed_at)
+ end
+
def content_type_ids
ids = []
documents.try :each do |d|
ids << d.content_type
end
@@ -90,13 +98,15 @@
end
def is_investor_approved?
audiences.index(DigitalAsset::Audience::INVESTOR_APPROVED)
end
+ alias :investor_approved? :is_investor_approved?
def is_institutional_use?
audiences.index(DigitalAsset::Audience::INSTITUTIONAL_USE)
end
+ alias :institutional_use? :is_institutional_use?
def product
TaxonomyTerm.label_for_term(product_ids[0])
end
def program