activeset 0.4.3 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +3 -0
- data/lib/active_set/processors/filter/active_record_adapter.rb +6 -4
- data/lib/active_set/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40f42594ad16de88043af834c1fd25c435e35bcd
|
4
|
+
data.tar.gz: 064a4a104d040a1d28bafabdcf437a69bfe8baa5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 071f0b2aa19d7691660693a6cfdca52cb6bbf7fd3c4cbab7deea0d6e5c651e5c2445e4f47932f08f31bb006604489135ed8dc9c50bd008cf9e8d7d0b3d7c6807
|
7
|
+
data.tar.gz: f77c58fdef21bd82910ffaed576584cb736398170cf4ef1f9d637364b0144034dda06c7c35c48f71edce83102ceabd50c5c90975cc30b701998b9ced2dcaaa51
|
data/CHANGELOG
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
v 0.4.4
|
2
|
+
- Ensure that the ActiveRecord filterer can handle Rails4 AR::Relations not responding to :methods on the underlying class
|
3
|
+
- Test scopes defined using the helper but also as simply class methods
|
1
4
|
v 0.4.3
|
2
5
|
- Properly specify the version dependency on ActiveSupport
|
3
6
|
v 0.4.2
|
@@ -49,10 +49,12 @@ class ActiveSet
|
|
49
49
|
end
|
50
50
|
|
51
51
|
def attribute_model
|
52
|
-
@instruction.associations_array
|
53
|
-
|
54
|
-
|
55
|
-
|
52
|
+
tmp_model = @instruction.associations_array
|
53
|
+
.reduce(@set) do |obj, assoc|
|
54
|
+
obj.reflections[assoc.to_s]&.klass
|
55
|
+
end
|
56
|
+
return tmp_model.klass if tmp_model.is_a?(ActiveRecord::Relation)
|
57
|
+
tmp_model
|
56
58
|
end
|
57
59
|
|
58
60
|
def arel_eager_load_associations
|
data/lib/active_set/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activeset
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen Margheim
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-10-
|
11
|
+
date: 2017-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|