renalware-core 2.0.33 → 2.0.34

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: 6cb83ec4abb560e829604647e54cc9ad09d82dc7a5505d8f5f07491995f5b23f
4
- data.tar.gz: 2a2113a1fbfde978e756208df0c8bf73e3fb6634f0bcde25ba3d48d45dfb8907
3
+ metadata.gz: d9f1d61c7f654e5dd89e867056ea4e272b89749a6713977cb6d7e46d09661e3e
4
+ data.tar.gz: c58ace6f98d24326bae07fff01d57f8fc6cf2e1058d278c6986d526d65a89463
5
5
  SHA512:
6
- metadata.gz: 1324b463a16ae76bbbcb00a1c23a071eec16fa95494f536ea2be996d4931720ccddd896a42f1c03557921e4efadeaae8c2f17b67dc29075f491c8545f3257ccb
7
- data.tar.gz: a0de64f66ec38ee3b10f5cc9cbaee028d762cf5986364e2c50dfc521ff206c916abfdea83bb15127ff7b3f2d372b8369e01f422f589361d280a48e8469d37e11
6
+ metadata.gz: 145c983783938cd21ed54a380620e51ef7bf7a2c9cc9b4f5d622c1afda2df505ccbac665a5e8b24682dd7bb3b2f6f5b82da52ec4a29e4cb2c21994a26acf440c
7
+ data.tar.gz: 3d15d1971d32dadfb74b35b387dbc9969f29facec45a33732bcdfa4453fb007a18d61affaaa7a03e624f049f8dcefec70cc101b6dae48f12dd1dfda5dbdf3eee
@@ -17,7 +17,7 @@ module Renalware
17
17
  def author
18
18
  user = Renalware::User.find(params[:author_id])
19
19
  author = Letters.cast_author(user)
20
- letters = author.letters.order(issued_on: :desc).page(page).per(per_page)
20
+ letters = author.letters.ordered.page(page).per(per_page)
21
21
  authorize letters
22
22
  render locals: {
23
23
  author: author,
@@ -56,7 +56,8 @@ module Renalware
56
56
  }
57
57
  singleton_class.send(:alias_method, :in_progress, :pending)
58
58
 
59
- scope :reverse, -> { order(updated_at: :desc) }
59
+ scope :reverse, -> { order(updated_at: :asc) }
60
+ scope :ordered, -> { order(updated_at: :desc) }
60
61
  scope :with_letterhead, -> { includes(:letterhead) }
61
62
  scope :with_main_recipient, -> { includes(main_recipient: [:address, :addressee]) }
62
63
  scope :with_author, -> { includes(:author) }
@@ -30,12 +30,12 @@ module Renalware
30
30
  def find_letters
31
31
  letters_patient
32
32
  .letters
33
+ .ordered
33
34
  .with_main_recipient
34
35
  .with_letterhead
35
36
  .with_author
36
37
  .with_patient
37
38
  .limit(Renalware.config.clinical_summary_max_letters_to_display)
38
- .order(issued_on: :desc)
39
39
  end
40
40
 
41
41
  def present_letters(letters)
@@ -97,7 +97,7 @@ module Renalware
97
97
  def letters
98
98
  patient_ = Renalware::Letters.cast_patient(patient)
99
99
  letters_ = patient_.letters
100
- .order(issued_on: :desc)
100
+ .ordered
101
101
  .with_main_recipient
102
102
  .with_letterhead
103
103
  .with_author
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Renalware
4
- VERSION = "2.0.33"
4
+ VERSION = "2.0.34"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: renalware-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.33
4
+ version: 2.0.34
5
5
  platform: ruby
6
6
  authors:
7
7
  - Airslie
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-19 00:00:00.000000000 Z
11
+ date: 2018-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_type