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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 211af482396d9667075a43f5ec6d881fc6b2f2bc
4
- data.tar.gz: 207a3373b4400315c198b2a7133954197ba6bd14
3
+ metadata.gz: 92fee36d09df07d0dd803a6ca175687b988a2339
4
+ data.tar.gz: 77cf4cd7cb37fe761d646193765c6019139a1390
5
5
  SHA512:
6
- metadata.gz: 56977c250f89ef9188916e451faf02a7ddae7cbb1a8336cdf636893952736ef253df4731cb943d6bbe572511c8ec831be60b55f70d77be8fc75b4e9cbdbacb0c
7
- data.tar.gz: 0516b7b91c5158026bc5a6dee6a2ed783f413e80168eb7fe8c0415b0c9c78bee5880674c49ee446ae780e8c9f25f73899eca004a64b3d462365e59d664d7edbf
6
+ metadata.gz: 258a51da0aefc0c2bdec2f913ce66574329ff5a2bdc18e1ae159c414aed143b9cb69b1edf13686ef28a7700ff5f5113017dc832b906d5094d0780939f8ec8ade
7
+ data.tar.gz: 171ec8c00d66a1399d66fe60715aaf5b5ee6153d7da7904d6c7f4727573791603445125194ca3c63e167fe266532f3337f22f5bee2eca0a141cc81a988124681
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- freeze_tag (0.1.4)
4
+ freeze_tag (0.1.5)
5
5
  rails (>= 4.2)
6
6
 
7
7
  GEM
@@ -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
@@ -1,3 +1,3 @@
1
1
  module FreezeTag
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: freeze_tag
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Franzen