app/models/digital_asset.rb in daengine-0.6.23 vs app/models/digital_asset.rb in daengine-0.7

- old
+ new

@@ -37,11 +37,11 @@ field :fund_codes, type: Array, default: [] field :digital_asset_id, type: String key :digital_asset_id #Exclude XBRL documents from all queries - default_scope excludes(:content_type => "LDJDCMAIK") #Had to use static value instead of a Constant + default_scope excludes(:content_type => "74") #Had to use static value instead of a Constant scope :title_is, ->(title) { where(:title => title)} scope :business_owner_is, ->(business_owner) { where(:business_owner => business_owner)} scope :guid_is, ->(guid) { where(:guid => guid)} scope :digital_asset_id_is, ->(id) { where(:digital_asset_id => id)} @@ -110,25 +110,25 @@ audiences.index(DigitalAsset::Audience::INSTITUTIONAL_USE) end alias :institutional_use? :is_institutional_use? def product - TaxonomyTerm.label_for_term(product_ids[0]) + AccentTermLabel.label_for(product_ids[0]) end def program - TaxonomyTerm.label_for_term(program_ids[0]) + AccentTermLabel.label_for(program_ids[0]) end def content_org - TaxonomyTerm.label_for_term(content_organization_ids[0]) + AccentTermLabel.label_for(content_organization_ids[0]) end def content_type_label - TaxonomyTerm.label_for_term(content_type) + AccentTermLabel.label_for(content_type) end def audience - TaxonomyTerm.label_for_term(audiences[0]) + AccentTermLabel.label_for(audiences[0]) end def primary_path path end @@ -153,38 +153,39 @@ # validates_format_of :path, without: /\/manifest|archives\// # dont accept manifest files # end class DigitalAsset::ContentType - FINRA = '549' - PROSPECTUS = '542' - FACTSHEET = '533' - COMMENTARY = '532' - FUND_YIELD = '538' - FLYER = '511' - L_SHARE_YIELD_SHEET = 'MCOBX14FY' - P_SHARE_YIELD_SHEET = 'MCOBYY7SX' - ANNUAL_REPORT = '529' - SEMIANNUAL_REPORT = '541' - SAI = '540' - SUMMARY_PROSPECTUS = '5380' - DAILY_HOLDINGS = 'MA53THCZQ' - MONTHLY_HOLDINGS = 'MA53Y14FY' + FINRA = "29" + PROSPECTUS = "52" + FACTSHEET = "32" + COMMENTARY = "47" + FUND_YIELD = "44" + FLYER = "30" + L_SHARE_YIELD_SHEET = "484" + P_SHARE_YIELD_SHEET = "485" + ANNUAL_REPORT = "23" + SEMIANNUAL_REPORT = "62" + SAI = "58" + SUMMARY_PROSPECTUS = "65" + DAILY_HOLDINGS = "28" + MONTHLY_HOLDINGS = "42" BUSINESS_CALENDAR = 'MA540I7SX' - WEEKLY_HOLDINGS = 'MA542HDIJ' + WEEKLY_HOLDINGS = "69" FUND_DOCUMENTS = '528' FORMS_AND_APPLICATIONS = '496' - XBRL_DOCUMENT = 'LDJDCMAIK' + XBRL_DOCUMENT = '74' FUND_DOC_TYPES = [DAILY_HOLDINGS, WEEKLY_HOLDINGS, MONTHLY_HOLDINGS, COMMENTARY,FACTSHEET, PROSPECTUS,SUMMARY_PROSPECTUS,ANNUAL_REPORT,SEMIANNUAL_REPORT,SAI,BUSINESS_CALENDAR,FUND_YIELD, L_SHARE_YIELD_SHEET, P_SHARE_YIELD_SHEET ] end + class DigitalAsset::Audience - INVESTOR_APPROVED = '490' - INSTITUTIONAL_USE = '491' + INVESTOR_APPROVED = "13" + INSTITUTIONAL_USE = "12" end FUND_DOC_ORDER = { :daily_holdings => [DigitalAsset::ContentType::DAILY_HOLDINGS],