mumuki-domain 9.9.0 → 9.10.0

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
  SHA256:
3
- metadata.gz: bae661db3a1a6f210ac27b6d998846fde5a4968acdbcec182db4cca7d9dd4245
4
- data.tar.gz: 8ed2e95b7d1b21768062735e1fe8c5fbb55fe50e0c17821ae6e3baf8a9d50b5c
3
+ metadata.gz: 51a03f1d01bc567c0b91939577bd7fad54968380794122c8f93a6355b4d2fd87
4
+ data.tar.gz: e953f4fdca9d236bfef4e9ab6d9543fec286229b668cf071830d6c98f38bfa39
5
5
  SHA512:
6
- metadata.gz: b0f931e47808ff51e1cabe419e31a3d59ad9a3d3cf61f6ef66ff9b3e2026bc3db6441f5352002fad29d047ad23fa5030bede82b0d6a7b8e07b58875a236a1827
7
- data.tar.gz: 2da409d2e2c0e606457e6f78e72d97ec7ac8ba9ca0c20b12cffc3d48e9d4d72e131e7379ff2ceb60c1aa124f4ec5db30e653fca12812b0bb4ef4db3398d72d32
6
+ metadata.gz: 46ef5320c51569aab17dda636d81fcba3cc27cbbf7e9f22f78c96a67b97aa1f7f3d25127c9cd7bded347a5764a91b970c1ec5809c84bb904930d61212cd81cda
7
+ data.tar.gz: c3ffff05f15964f1bac7ea31adc0e5c78e09ce7ccc47dee8f95347205b692aa93be2c0f79ed9162fbf27a664eb60e205eeaf7f078e5456b5356a2e73b4db7f2f
@@ -21,6 +21,7 @@ class Discussion < ApplicationRecord
21
21
  scope :no_responsible_moderator, -> { where('responsible_moderator_at < ?', Time.now - MODERATOR_MAX_RESPONSIBLE_TIME)
22
22
  .or(where(responsible_moderator_at: nil)) }
23
23
  scope :pending_review, -> { where(status: :pending_review) }
24
+ scope :unread_first, -> { (includes(:subscriptions).reorder('subscriptions.read')) }
24
25
 
25
26
  after_create :subscribe_initiator!
26
27
 
@@ -11,7 +11,7 @@ class UserStats < ApplicationRecord
11
11
  end
12
12
 
13
13
  def activity(date_range = nil)
14
- date_filter = { updated_at: date_range }.compact
14
+ date_filter = { submitted_at: date_range }.compact
15
15
  {
16
16
  exercises: {
17
17
  solved_count: organization_exercises
@@ -1,5 +1,5 @@
1
1
  module Mumuki
2
2
  module Domain
3
- VERSION = '9.9.0'
3
+ VERSION = '9.10.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mumuki-domain
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.9.0
4
+ version: 9.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Franco Leonardo Bulgarelli
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-15 00:00:00.000000000 Z
11
+ date: 2021-07-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails