squeel 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +5 -0
- data/lib/squeel/adapters/active_record/3.0/relation_extensions.rb +2 -1
- data/lib/squeel/adapters/active_record/3.1/relation_extensions.rb +2 -1
- data/lib/squeel/adapters/active_record/compat.rb +1 -22
- data/lib/squeel/version.rb +1 -1
- data/spec/squeel/adapters/active_record/relation_extensions_spec.rb +5 -0
- metadata +3 -3
data/CHANGELOG.md
CHANGED
@@ -53,7 +53,8 @@ module Squeel
|
|
53
53
|
|
54
54
|
@where_values = predicate_viz.accept((@where_values - ['']).uniq)
|
55
55
|
@having_values = predicate_viz.accept(@having_values.uniq.reject{|h| h.blank?})
|
56
|
-
|
56
|
+
# FIXME: AR barfs on ARel attributes in group_values. Workaround?
|
57
|
+
# @group_values = attribute_viz.accept(@group_values.uniq.reject{|g| g.blank?})
|
57
58
|
@order_values = attribute_viz.accept(@order_values.uniq.reject{|o| o.blank?})
|
58
59
|
@select_values = attribute_viz.accept(@select_values.uniq)
|
59
60
|
|
@@ -63,7 +63,8 @@ module Squeel
|
|
63
63
|
|
64
64
|
@where_values = predicate_viz.accept((@where_values - ['']).uniq)
|
65
65
|
@having_values = predicate_viz.accept(@having_values.uniq.reject{|h| h.blank?})
|
66
|
-
|
66
|
+
# FIXME: AR barfs on ARel attributes in group_values. Workaround?
|
67
|
+
# @group_values = attribute_viz.accept(@group_values.uniq.reject{|g| g.blank?})
|
67
68
|
@order_values = attribute_viz.accept(@order_values.uniq.reject{|o| o.blank?})
|
68
69
|
@select_values = attribute_viz.accept(@select_values.uniq)
|
69
70
|
|
@@ -1,22 +1 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
module Nodes
|
4
|
-
|
5
|
-
class Grouping < Unary
|
6
|
-
include Arel::Predications
|
7
|
-
end unless Grouping.include?(Arel::Predications)
|
8
|
-
|
9
|
-
end
|
10
|
-
|
11
|
-
module Visitors
|
12
|
-
|
13
|
-
class DepthFirst < Visitor
|
14
|
-
|
15
|
-
unless method_defined?(:visit_Arel_Nodes_InfixOperation)
|
16
|
-
alias :visit_Arel_Nodes_InfixOperation :binary
|
17
|
-
end
|
18
|
-
|
19
|
-
end
|
20
|
-
|
21
|
-
end
|
22
|
-
end
|
1
|
+
require 'squeel/adapters/active_record/3.1/compat'
|
data/lib/squeel/version.rb
CHANGED
@@ -686,6 +686,11 @@ module Squeel
|
|
686
686
|
relation.should eq Person.scoped
|
687
687
|
end
|
688
688
|
|
689
|
+
it "doesn't ruin everything when a group exists" do
|
690
|
+
relation = Person.scoped.merge(Person.group{name})
|
691
|
+
count_hash = relation.count
|
692
|
+
end
|
693
|
+
|
689
694
|
end
|
690
695
|
|
691
696
|
describe '#to_a' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: squeel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -240,7 +240,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
240
240
|
version: '0'
|
241
241
|
segments:
|
242
242
|
- 0
|
243
|
-
hash:
|
243
|
+
hash: -4324622899470909075
|
244
244
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
245
245
|
none: false
|
246
246
|
requirements:
|
@@ -249,7 +249,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
249
249
|
version: '0'
|
250
250
|
segments:
|
251
251
|
- 0
|
252
|
-
hash:
|
252
|
+
hash: -4324622899470909075
|
253
253
|
requirements: []
|
254
254
|
rubyforge_project: squeel
|
255
255
|
rubygems_version: 1.8.24
|