active_windows 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/active_windows/active_record_extensions.rb +18 -5
- data/lib/active_windows/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2b6484d037d47f4cfa292310a435491c37b03c15921159e34df31e6d69972f9f
|
|
4
|
+
data.tar.gz: 20ec937b0f30935c9d2775508c4a22e75edaa791b0e4ad4ce51bced086efa512
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5abfc8d5ca03ab4bd1c8ef3f76c0919b9b4dce21b2d576ad1650d0bebc870c9f29c6944441560bed1c6a73fe3742ae7adfa25f9d6439e66723e759fa07890a1a
|
|
7
|
+
data.tar.gz: 6b195b1e5afb8b55b641208c9ebb9540b329d9a0f2de18e33ec3dcfd17acb85bf15d461bde3cb004261744289c253a8ea033311c0d3ec1edab9b184acd55fc56
|
|
@@ -44,11 +44,24 @@ module ActiveWindows
|
|
|
44
44
|
@relation.window(to_window_hash)
|
|
45
45
|
end
|
|
46
46
|
|
|
47
|
-
# Delegate
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
# Delegate to the materialized relation so the chain is transparent.
|
|
48
|
+
# Explicit delegates for Ruby protocol methods that must be defined eagerly.
|
|
49
|
+
delegate :to_sql, :to_a, :to_ary, :inspect, to: :to_relation
|
|
50
|
+
|
|
51
|
+
private
|
|
52
|
+
|
|
53
|
+
def method_missing(method, ...)
|
|
54
|
+
relation = to_relation
|
|
55
|
+
if relation.respond_to?(method)
|
|
56
|
+
relation.public_send(method, ...)
|
|
57
|
+
else
|
|
58
|
+
super
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
def respond_to_missing?(method, include_private = false)
|
|
63
|
+
to_relation.respond_to?(method, include_private) || super
|
|
64
|
+
end
|
|
52
65
|
end
|
|
53
66
|
|
|
54
67
|
module QueryMethods
|