app/models/digital_asset.rb in daengine-0.5.10 vs app/models/digital_asset.rb in daengine-0.5.13
- old
+ new
@@ -19,10 +19,15 @@
field :content_organization_ids, type: Array, default: []
field :program_ids, type: Array, default: []
field :omniture_codes, type: Array, default: []
field :orderable, :type => Boolean, default: false
+
+ field :ml_category, type: String
+ field :control_number, type: String
+ field :key_accounts, type: Array, default: []
+
key :guid
# field :documents, type: Hash
embeds_many :documents, :class_name => 'DigitalAsset::Document'
@@ -52,9 +57,11 @@
scope :orderable, -> {where(orderable: true)}
scope :has_finra, -> {where(:'documents.content_type' => ContentType::FINRA)}
scope :audience_in, ->(audience) {where(:audiences.in => audience)}
scope :alphabetical, order_by(:title => :asc)
scope :not_xbrl, -> {excludes(:'documents.content_type' => ContentType::XBRL_DOCUMENT)}
+
+ scope :key_account_in, ->(key_account) {where(:key_accounts => key_account)}
#scope :order_by_fund, order_by[[:product_ids, :asc]]
#default_scope {not_in(:'documents.content_type' => ["LDJDCMAIK"])}
# validations