daengine 0.4.0.2 → 0.4.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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