Skip to content

Commit 70eb4f5

Browse files
bhaakPatric Mueller
authored and
Patric Mueller
committed
Disable order compatible mode for ActiveRecord < 5
There is a bug with order and last: rzane#84
1 parent 3f417a2 commit 70eb4f5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/baby_squeel/compat.rb

+2
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ def select(*args, &block)
120120
end
121121

122122
# Overrides ActiveRecord::QueryMethods#order
123+
if ::ActiveRecord.version >= Gem::Version.new("5")
123124
def order(*args, &block)
124125
if block_given? && args.empty?
125126
ordering(&block)
@@ -135,6 +136,7 @@ def reorder(*args, &block)
135136
super
136137
end
137138
end
139+
end
138140

139141
# Overrides ActiveRecord::QueryMethods#group
140142
def group(*args, &block)

0 commit comments

Comments
 (0)