active_record_distinct_on 1.1.0 → 1.2.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: '096152ff6a14c3419f6d8196a9b8fcfd6fb493ad77db7171f3294b475d461415'
4
- data.tar.gz: 375f1085f3eb6d7e1077fc2a0745a5d225b181118662a88f54640fd34d55c054
3
+ metadata.gz: 572034f5178dc5562158b99877ea6dbc6f87de82648361e26cece02fe8db6f2f
4
+ data.tar.gz: d0f7ca1d83135050482db9b558dff30cd9b91b090a8207aacc0b09e46159126c
5
5
  SHA512:
6
- metadata.gz: cfda3ac9d31b0062ae5fba155eedd12a55e0e0be0b440029d4c387c6d579fb10a2c10c0f35eef235bce842eef65bfe423a7e471a9194bb1d14f49e0d8aa8c541
7
- data.tar.gz: f68fdb758e4d9e17b72e1ba3797075d3b13f81af7c5af3c253cf127756bee8fe9093c491e9ce9a923339202f5647b4a33ab2d13f1fc6dcea4ef1f4e98293240d
6
+ metadata.gz: ac640bfb72c21901b899d974939c5e8346e086eed9fb09cb67b988c2ce115dbfe80bb43ff1f7d6b557a144427669f479c0b35fb2e3c274a027e3f880a8cffbaf
7
+ data.tar.gz: d9b5e17c0dd710b105067bf36fe9f38f8c0d0df0ab703078a538b04bf5bef73631be121137259f76d15b8a546f28bd5e4f7c10bb092823d6f497cd2aa8aeb5c4
@@ -30,9 +30,9 @@ module ActiveRecordDistinctOn
30
30
  fields.flatten!
31
31
  fields.map! { |field|
32
32
  if klass.attribute_alias?(field)
33
- arel_attribute(klass.attribute_alias(field).to_sym)
33
+ arel_table[klass.attribute_alias(field).to_sym]
34
34
  else
35
- arel_attribute(field)
35
+ arel_table[field]
36
36
  end
37
37
  }
38
38
  self.distinct_on_values += fields
@@ -1,3 +1,3 @@
1
1
  module ActiveRecordDistinctOn
2
- VERSION = '1.1.0'
2
+ VERSION = '1.2.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_record_distinct_on
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alec Larsen
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-01 00:00:00.000000000 Z
11
+ date: 2021-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -76,16 +76,16 @@ dependencies:
76
76
  name: simplecov
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
- - - '='
79
+ - - ">="
80
80
  - !ruby/object:Gem::Version
81
- version: 0.18.1
81
+ version: '0'
82
82
  type: :development
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
- - - '='
86
+ - - ">="
87
87
  - !ruby/object:Gem::Version
88
- version: 0.18.1
88
+ version: '0'
89
89
  - !ruby/object:Gem::Dependency
90
90
  name: pry
91
91
  requirement: !ruby/object:Gem::Requirement
@@ -147,7 +147,7 @@ homepage: https://github.com/alecdotninja/active_record_distinct_on
147
147
  licenses:
148
148
  - MIT
149
149
  metadata: {}
150
- post_install_message:
150
+ post_install_message:
151
151
  rdoc_options: []
152
152
  require_paths:
153
153
  - lib
@@ -162,8 +162,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
162
162
  - !ruby/object:Gem::Version
163
163
  version: '0'
164
164
  requirements: []
165
- rubygems_version: 3.1.2
166
- signing_key:
165
+ rubygems_version: 3.2.31
166
+ signing_key:
167
167
  specification_version: 4
168
168
  summary: Adds support for `DISTINCT ON` statements when querying with ActiveRecord
169
169
  test_files: []