freeze_tag 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/freeze_tag/taggable.rb +6 -6
- data/lib/freeze_tag/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: 4efe3728e7ca3f3481063a4031f602f2c2f95667
|
4
|
+
data.tar.gz: 0d346dfeea75f18484606ca6cf022fb58a8734ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17397bdfd51dad209132c32c368a1c89b1ae86db33f202c243a2ac738dc184202f5789f5dd563f500755bf4d9bc59929f593b75dab377400c4bec1541575d022
|
7
|
+
data.tar.gz: 59b40f8ba43789c5123224442724ac645e88586a9c440612c33b95b5e0df0b9efe97979f003f1c06721bef69959ba04d3c3cc1891cced787f1ef587bfbbce1c9
|
data/Gemfile.lock
CHANGED
data/lib/freeze_tag/taggable.rb
CHANGED
@@ -70,27 +70,27 @@ module FreezeTag
|
|
70
70
|
def freeze_tagged(as: nil, list: nil)
|
71
71
|
as = as.downcase if self.try(:freeze_tag_case_sensitive)
|
72
72
|
if list.present?
|
73
|
-
self.joins("INNER JOIN freeze_tags ON freeze_tags.taggable_id = #{self.table_name}.id AND (freeze_tags.expired_at IS NULL OR freeze_tags.expired_at > '#{DateTime.now}') AND freeze_tags.tag = '#{as}' AND freeze_tags.list = '#{list}'")
|
73
|
+
self.joins("INNER JOIN freeze_tags ON freeze_tags.taggable_id = #{self.table_name}.id AND (freeze_tags.expired_at IS NULL OR freeze_tags.expired_at > '#{DateTime.now}') AND freeze_tags.tag = '#{as}' AND freeze_tags.list = '#{list}'").distinct
|
74
74
|
else
|
75
|
-
self.joins("INNER JOIN freeze_tags ON freeze_tags.taggable_id = #{self.table_name}.id AND (freeze_tags.expired_at IS NULL OR freeze_tags.expired_at > '#{DateTime.now}') AND freeze_tags.tag = '#{as}'")
|
75
|
+
self.joins("INNER JOIN freeze_tags ON freeze_tags.taggable_id = #{self.table_name}.id AND (freeze_tags.expired_at IS NULL OR freeze_tags.expired_at > '#{DateTime.now}') AND freeze_tags.tag = '#{as}'").distinct
|
76
76
|
end
|
77
77
|
end
|
78
78
|
|
79
79
|
def previously_freeze_tagged(as: nil, list: nil)
|
80
80
|
as = as.downcase if self.try(:freeze_tag_case_sensitive)
|
81
81
|
if list.present?
|
82
|
-
self.joins("INNER JOIN freeze_tags ON freeze_tags.taggable_id = #{self.table_name}.id AND freeze_tags.expired_at < '#{DateTime.now}' AND freeze_tags.tag = '#{as}' AND freeze_tags.list = '#{list}'")
|
82
|
+
self.joins("INNER JOIN freeze_tags ON freeze_tags.taggable_id = #{self.table_name}.id AND freeze_tags.expired_at < '#{DateTime.now}' AND freeze_tags.tag = '#{as}' AND freeze_tags.list = '#{list}'").distinct
|
83
83
|
else
|
84
|
-
self.joins("INNER JOIN freeze_tags ON freeze_tags.taggable_id = #{self.table_name}.id AND freeze_tags.expired_at < '#{DateTime.now}' AND freeze_tags.tag = '#{as}'")
|
84
|
+
self.joins("INNER JOIN freeze_tags ON freeze_tags.taggable_id = #{self.table_name}.id AND freeze_tags.expired_at < '#{DateTime.now}' AND freeze_tags.tag = '#{as}'").distinct
|
85
85
|
end
|
86
86
|
end
|
87
87
|
|
88
88
|
def ever_freeze_tagged(as: nil, list: nil)
|
89
89
|
as = as.downcase if self.try(:freeze_tag_case_sensitive)
|
90
90
|
if list.present?
|
91
|
-
self.joins("INNER JOIN freeze_tags ON freeze_tags.taggable_id = #{self.table_name}.id AND freeze_tags.tag = '#{as}' AND freeze_tags.list = '#{list}'")
|
91
|
+
self.joins("INNER JOIN freeze_tags ON freeze_tags.taggable_id = #{self.table_name}.id AND freeze_tags.tag = '#{as}' AND freeze_tags.list = '#{list}'").distinct
|
92
92
|
else
|
93
|
-
self.joins("INNER JOIN freeze_tags ON freeze_tags.taggable_id = #{self.table_name}.id AND freeze_tags.tag = '#{as}'")
|
93
|
+
self.joins("INNER JOIN freeze_tags ON freeze_tags.taggable_id = #{self.table_name}.id AND freeze_tags.tag = '#{as}'").distinct
|
94
94
|
end
|
95
95
|
end
|
96
96
|
end
|
data/lib/freeze_tag/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: freeze_tag
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Franzen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04-
|
11
|
+
date: 2018-04-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|