app/models/digital_asset.rb in daengine-0.4.0.3 vs app/models/digital_asset.rb in daengine-0.4.0.4
- old
+ new
@@ -39,9 +39,10 @@
# scope :funds_in, ->(fund_id) { where(:fund_ids.in => fund_id)}
scope :audience_in, ->(audience_id) {where(:audiences.in => audience_id)}
scope :content_organization_in, ->(content_organization_id) {where(:content_organization_ids.in => content_organization_id)}
scope :program_id_in, ->(program_id) {where(:program_ids.in => program_id)}
scope :sami_is, ->(sami_code) {where(:sami_code => sami_code)}
+ scope :sami_in, ->(sami_codes) {where(:sami_code.in => sami_codes)}
scope :path_is, ->(path) {where(:'documents.path' => path)}
scope :doctype_in, ->(types) {where(:'documents.content_type'.in => types)}
scope :content_type_in, ->(types) {where(:'documents.content_type'.in => types)}
scope :product_in, ->(types) {where(:product_ids.in => types)}
scope :stale, -> {where(:updated_at.lte => 2.minutes.ago)}