rocket_tag 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/rocket_tag/taggable.rb +7 -6
- data/rocket_tag.gemspec +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.2
|
data/lib/rocket_tag/taggable.rb
CHANGED
@@ -11,11 +11,7 @@ module Squeel
|
|
11
11
|
#
|
12
12
|
# This call isolates the group by behaviours.
|
13
13
|
def isolate_group_by_as(type)
|
14
|
-
type.from(
|
15
|
-
end
|
16
|
-
|
17
|
-
def select_all
|
18
|
-
select('*')
|
14
|
+
type.from(self.arel.as(type.table_name))
|
19
15
|
end
|
20
16
|
|
21
17
|
# We really only want to group on id for practical
|
@@ -167,8 +163,13 @@ module RocketTag
|
|
167
163
|
# Provides the tag counting functionality by adding an
|
168
164
|
# aggregate count on id. Assumes valid a join has been
|
169
165
|
# made.
|
166
|
+
#
|
167
|
+
# Note that I should be able to chain count tags to
|
168
|
+
# the relation instead of passing the rel parameter in
|
169
|
+
# however my tests fails with wrong counts. This is
|
170
|
+
# not so elegant
|
170
171
|
def count_tags(rel)
|
171
|
-
rel.
|
172
|
+
rel.select('*').
|
172
173
|
select{count(~id).as(tags_count)}.
|
173
174
|
group_by_all_columns.
|
174
175
|
order("tags_count DESC").
|
data/rocket_tag.gemspec
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: rocket_tag
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.5.
|
5
|
+
version: 0.5.2
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Brad Phelan
|
@@ -144,7 +144,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
144
144
|
requirements:
|
145
145
|
- - ">="
|
146
146
|
- !ruby/object:Gem::Version
|
147
|
-
hash:
|
147
|
+
hash: -4599710415322138836
|
148
148
|
segments:
|
149
149
|
- 0
|
150
150
|
version: "0"
|