temporal_scopes 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/temporal_scopes/has_temporal_scopes.rb +4 -2
- data/lib/temporal_scopes/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 94a3e4d044e19b17f047f05119b5d8b314d10b9c
|
4
|
+
data.tar.gz: 9a278b03a99885399eeb0a4709688cec3213ffa3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71371629285a9090a909584c8e9cd709b4dc02423dec61b91ff603c9cfbbfe191d4ee31fdad52990525afa3b04bc4a9b0b1a27de4db03d42acdb9562f7bf5817
|
7
|
+
data.tar.gz: 2627721842d4d74837c9e93a72316c0a6bf13c6c78f28b6582e04e60b01dd5583b7833e14bcf0f4037a17d0191084e9590b8fab16796eb2392922c81ce4a339f
|
@@ -58,8 +58,10 @@ module TemporalScopes
|
|
58
58
|
# @return [ActiveRecord::Relation] the relation without temporal conditions on `valid_from` and `valid_to`.
|
59
59
|
#
|
60
60
|
def without_temporal_condition
|
61
|
-
relation =
|
62
|
-
relation.where_values.delete_if { |query|
|
61
|
+
relation = rewhere(valid_from: nil, valid_to: nil)
|
62
|
+
relation.where_values.delete_if { |query|
|
63
|
+
query.to_sql.include?("\"valid_from\"") || query.to_sql.include?("\"valid_to\"")
|
64
|
+
}
|
63
65
|
relation
|
64
66
|
end
|
65
67
|
|