daengine 0.4.0.2 → 0.4.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/app/models/digital_asset.rb +5 -3
- data/lib/daengine/version.rb +1 -1
- metadata +1 -1
data/app/models/digital_asset.rb
CHANGED
@@ -30,8 +30,9 @@ class DigitalAsset
|
|
30
30
|
|
31
31
|
accepts_nested_attributes_for :documents
|
32
32
|
|
33
|
-
|
34
|
-
|
33
|
+
#Exclude XBRL documents from all queries
|
34
|
+
default_scope excludes(:'documents.content_type' => "LDJDCMAIK") #Had to use static value instead of a Constant
|
35
|
+
|
35
36
|
scope :title_is, ->(title) { where(:title => title)}
|
36
37
|
scope :business_owner_is, ->(business_owner) { where(:business_owner => business_owner)}
|
37
38
|
scope :guid_is, ->(guid) { where(:guid => guid)}
|
@@ -51,7 +52,8 @@ class DigitalAsset
|
|
51
52
|
scope :audience_in, ->(audience) {where(:audiences.in => audience)}
|
52
53
|
scope :alphabetical, order_by(:title => :asc)
|
53
54
|
scope :not_xbrl, -> {excludes(:'documents.content_type' => ContentType::XBRL_DOCUMENT)}
|
54
|
-
#
|
55
|
+
#scope :order_by_fund, order_by[[:product_ids, :asc]]
|
56
|
+
#default_scope {not_in(:'documents.content_type' => ["LDJDCMAIK"])}
|
55
57
|
|
56
58
|
# validations
|
57
59
|
validates_presence_of :guid, :title, :changed_at, :published_at,
|
data/lib/daengine/version.rb
CHANGED