diff options
author | Denis Jean <denis.jean@ecairn.com> | 2012-01-11 12:45:55 +0100 |
---|---|---|
committer | Arun Agrawal <arunagw@gmail.com> | 2012-03-12 17:44:10 +0530 |
commit | a2c2f406612a1855fbc6fe816cf3e15b4ef531d3 (patch) | |
tree | 93c2ec480fc6e4388de5a990e28c15f96d4345d1 /activerecord/lib/active_record | |
parent | 0533ee45a7a03145d4a37a2b6e3275c6f625a295 (diff) | |
download | rails-a2c2f406612a1855fbc6fe816cf3e15b4ef531d3.tar.gz rails-a2c2f406612a1855fbc6fe816cf3e15b4ef531d3.tar.bz2 rails-a2c2f406612a1855fbc6fe816cf3e15b4ef531d3.zip |
fix activerecord query_method regression with offset into Fixnum
add test to show offset query_methods on mysql & mysql2
change test to cover public API
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/relation/query_methods.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb index 87dd513880..d737b34115 100644 --- a/activerecord/lib/active_record/relation/query_methods.rb +++ b/activerecord/lib/active_record/relation/query_methods.rb @@ -329,7 +329,7 @@ module ActiveRecord arel.having(*@having_values.uniq.reject{|h| h.blank?}) unless @having_values.empty? arel.take(connection.sanitize_limit(@limit_value)) if @limit_value - arel.skip(@offset_value) if @offset_value + arel.skip(@offset_value.to_i) if @offset_value arel.group(*@group_values.uniq.reject{|g| g.blank?}) unless @group_values.empty? |