daengine 0.4.8 → 0.4.9
Sign up to get free protection for your applications and to get access to all the features.
- data/app/service/digital_asset_lookup_service.rb +11 -0
- data/lib/daengine/version.rb +1 -1
- metadata +2 -2
@@ -5,6 +5,17 @@ class DigitalAssetLookupService
|
|
5
5
|
DigitalAsset.unscoped.content_type_in(DigitalAsset::ContentType::FUND_DOC_TYPES).product_in ids
|
6
6
|
end
|
7
7
|
|
8
|
+
def self.find_documents_by_fund_code_and_content_type(fund_codes,content_type)
|
9
|
+
assets = DigitalAssetLookupService.find_documents_by_fund_code(fund_codes)
|
10
|
+
found_asset = nil
|
11
|
+
assets.each {|da|
|
12
|
+
da.documents.each {|doc|
|
13
|
+
found_asset = da if doc.content_type == content_type
|
14
|
+
}
|
15
|
+
}
|
16
|
+
found_asset
|
17
|
+
end
|
18
|
+
|
8
19
|
def self.fund_code_from_id(taxonomy_id)
|
9
20
|
TaxonomyTerm.term_id_is(taxonomy_id).try(:term_type).try([], 'FUND_CODE')
|
10
21
|
end
|
data/lib/daengine/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: daengine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.4.
|
5
|
+
version: 0.4.9
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- sbhatia
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-
|
13
|
+
date: 2013-05-22 00:00:00.000000000Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|