diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2009-12-27 17:37:36 +0530 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-12-27 17:37:36 +0530 |
commit | a3f3fab7955a0874bd58d1d997e344bdde710628 (patch) | |
tree | b7698ba14ef293b4756aef40d47edae8cd8e2416 /activerecord/lib/active_record/base.rb | |
parent | 6f5e3a04d655e09c0a9a32fc94c752f84c7011f6 (diff) | |
download | rails-a3f3fab7955a0874bd58d1d997e344bdde710628.tar.gz rails-a3f3fab7955a0874bd58d1d997e344bdde710628.tar.bz2 rails-a3f3fab7955a0874bd58d1d997e344bdde710628.zip |
Add relation.from as a temporary workaround until arel relation has .from option
Diffstat (limited to 'activerecord/lib/active_record/base.rb')
-rwxr-xr-x | activerecord/lib/active_record/base.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 302c9fb724..c0b8e7e14f 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -1632,7 +1632,8 @@ module ActiveRecord #:nodoc: group(construct_group(options[:group], options[:having], scope)). order(construct_order(options[:order], scope)). limit(construct_limit(options[:limit], scope)). - offset(construct_offset(options[:offset], scope)) + offset(construct_offset(options[:offset], scope)). + from(options[:from]) relation = relation.readonly if options[:readonly] |