daengine 0.4.0.1 → 0.4.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/app/models/digital_asset.rb +3 -2
- data/lib/daengine/version.rb +1 -1
- metadata +1 -1
data/app/models/digital_asset.rb
CHANGED
@@ -30,7 +30,8 @@ class DigitalAsset
|
|
30
30
|
|
31
31
|
accepts_nested_attributes_for :documents
|
32
32
|
|
33
|
-
default_scope
|
33
|
+
default_scope {excludes(:'documents.content_type' => ContentType::XBRL_DOCUMENT)}
|
34
|
+
#default_scope {not_in(:'documents.content_type' => [ContentType::XBRL_DOCUMENT])}
|
34
35
|
scope :title_is, ->(title) { where(:title => title)}
|
35
36
|
scope :business_owner_is, ->(business_owner) { where(:business_owner => business_owner)}
|
36
37
|
scope :guid_is, ->(guid) { where(:guid => guid)}
|
@@ -49,7 +50,7 @@ class DigitalAsset
|
|
49
50
|
scope :has_finra, -> {where(:'documents.content_type' => ContentType::FINRA)}
|
50
51
|
scope :audience_in, ->(audience) {where(:audiences.in => audience)}
|
51
52
|
scope :alphabetical, order_by(:title => :asc)
|
52
|
-
|
53
|
+
scope :not_xbrl, -> {excludes(:'documents.content_type' => ContentType::XBRL_DOCUMENT)}
|
53
54
|
# scope :order_by_fund, order_by[[:product_ids, :asc]]
|
54
55
|
|
55
56
|
# validations
|
data/lib/daengine/version.rb
CHANGED