subj_models 0.6.8 → 0.6.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f39961b578a474b25b26ebaff318fe8157c4582a
4
- data.tar.gz: aedf0e5fe191633f3dd26fd7eb9bd5d7fc1f76ff
3
+ metadata.gz: 83b3db2e5f8927a6e738c5a0e02b99a9e84a50cc
4
+ data.tar.gz: be2661f76e5822262e661d59b50ea92d24eba982
5
5
  SHA512:
6
- metadata.gz: 6278572b6382fd53598c601b5ea258741e6c92060aa3bd46bf0ef2392d11d9fea7bc4b5337f21208eb8114caaf5c65c19e000bae7a5cb37482b59d08e96d35a3
7
- data.tar.gz: 3dfe80ce5ec23e25906b5182086d937964902e657a922a8e1054366810d175c57771c1f645b2b5f2f9991d8a75503b9fa307af512ee573db9e051419dcec8916
6
+ metadata.gz: 3276bb46bbe12c84cac0558095ac479c2049eab8bb343a9ad44a58bc00f51f303abf788f64ca4f8324ff138d3fe761f8f47b13ad4e0ff6af46583b9a1729ac19
7
+ data.tar.gz: 769466f49ea3cd44bdc6d12f9ba400be8186e7022f8e0fe77f0f0a732af90de15bf2acff97899b485cebf1e174a45065196a78b846c457aad06c7fe0e9fe46ad
@@ -66,13 +66,14 @@ module SubjModels
66
66
  end
67
67
 
68
68
  scope :internal_users, -> (condition) do
69
- joins(:user_card_delivery).where.not(user_card_deliveries: {id: nil} ).where(external_id: nil)
69
+ joins(:user_card_delivery).where.not(user_card_deliveries: {id: nil} ).where(external_id: nil).uniq
70
70
  end
71
71
 
72
72
  scope :updated_at_last_day, -> (date) do
73
73
  where.not(external_id: nil)
74
74
  .joins(:user_specialization_approvals)
75
75
  .where("user_specialization_approvals.updated_at > ? OR users.updated_at > ?", date.to_datetime, date.to_datetime)
76
+ .uniq
76
77
  end
77
78
 
78
79
  end
@@ -18,6 +18,7 @@ module SubjModels
18
18
  belongs_to :specialist_activity_document_type
19
19
 
20
20
  scope :user_id, -> (user_id) { where(user_id: user_id) }
21
+ scope :only_success, -> {where.not(user_specialization_id: nil)}
21
22
 
22
23
  end
23
24
 
@@ -1,3 +1,3 @@
1
1
  module SubjModels
2
- VERSION = "0.6.8"
2
+ VERSION = "0.6.9"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: subj_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.8
4
+ version: 0.6.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denys Dvoriashyn
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-03-15 00:00:00.000000000 Z
11
+ date: 2017-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler