aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation/query_methods.rb
diff options
context:
space:
mode:
authorOscar Del Ben <oscar@oscardelben.com>2012-07-16 11:55:46 -0700
committerOscar Del Ben <oscar@oscardelben.com>2012-07-16 11:55:46 -0700
commitc0e186c1555f43f53df70c1736de7047d5f4e678 (patch)
treee8bd7f2b05786b68c6f5d4254bf5198338fb1436 /activerecord/lib/active_record/relation/query_methods.rb
parent97350762da7c723eb49e30f827ee2e4eb5997fd8 (diff)
downloadrails-c0e186c1555f43f53df70c1736de7047d5f4e678.tar.gz
rails-c0e186c1555f43f53df70c1736de7047d5f4e678.tar.bz2
rails-c0e186c1555f43f53df70c1736de7047d5f4e678.zip
Add documentation for arel and build_arel
Diffstat (limited to 'activerecord/lib/active_record/relation/query_methods.rb')
-rw-r--r--activerecord/lib/active_record/relation/query_methods.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb
index b132e3e42e..5278e740da 100644
--- a/activerecord/lib/active_record/relation/query_methods.rb
+++ b/activerecord/lib/active_record/relation/query_methods.rb
@@ -602,10 +602,12 @@ module ActiveRecord
self
end
+ # Returns the Arel object associated with the relation.
def arel
@arel ||= with_default_scope.build_arel
end
+ # Like #arel, but ignores the default scope of the model.
def build_arel
arel = Arel::SelectManager.new(table.engine, table)