freeze_tag 0.1.5 → 0.1.6
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 +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 92fee36d09df07d0dd803a6ca175687b988a2339
|
4
|
+
data.tar.gz: 77cf4cd7cb37fe761d646193765c6019139a1390
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 258a51da0aefc0c2bdec2f913ce66574329ff5a2bdc18e1ae159c414aed143b9cb69b1edf13686ef28a7700ff5f5113017dc832b906d5094d0780939f8ec8ade
|
7
|
+
data.tar.gz: 171ec8c00d66a1399d66fe60715aaf5b5ee6153d7da7904d6c7f4727573791603445125194ca3c63e167fe266532f3337f22f5bee2eca0a141cc81a988124681
|
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}'").distinct
|
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("#{self.table_name}.id, *")
|
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}'").distinct
|
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("#{self.table_name}.id, *")
|
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}'").distinct
|
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("#{self.table_name}.id, *")
|
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}'").distinct
|
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("#{self.table_name}.id, *")
|
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}'").distinct
|
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("#{self.table_name}.id, *")
|
92
92
|
else
|
93
|
-
self.joins("INNER JOIN freeze_tags ON freeze_tags.taggable_id = #{self.table_name}.id AND freeze_tags.tag = '#{as}'").distinct
|
93
|
+
self.joins("INNER JOIN freeze_tags ON freeze_tags.taggable_id = #{self.table_name}.id AND freeze_tags.tag = '#{as}'").distinct("#{self.table_name}.id, *")
|
94
94
|
end
|
95
95
|
end
|
96
96
|
end
|
data/lib/freeze_tag/version.rb
CHANGED