app/models/digital_asset.rb in daengine-0.4.5 vs app/models/digital_asset.rb in daengine-0.4.6
- old
+ new
@@ -136,11 +136,11 @@
def fund_code
if @fund_code
return @fund_code
end
- pid = product_ids.find {|pid| TaxonomyTerm.find_term_by_id(pid).first.try(:fund_code)}
- @fund_code = pid and TaxonomyTerm.find_term_by_id(pid)[0].try(:fund_code).try(:rjust, 5, '0')
+ pid = product_ids.find {|pid| TaxonomyTerm.find_term_by_id(pid).try(:fund_code)}
+ @fund_code = pid and TaxonomyTerm.find_term_by_id(pid).try(:fund_code).try(:rjust, 5, '0')
end
def content_type
@content_type_label ||= TaxonomyTerm.label_for_term(content_type_id)
end