Browse files

Improve delegate list to avoid method missing.

  • Loading branch information...
1 parent 26e7400 commit 1af2a1d0f569407a4b2b643c57a884920ec0fabc @josevalim josevalim committed Dec 15, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 activerecord/lib/active_record/relation.rb
@@ -13,7 +13,8 @@ class Relation
include FinderMethods, Calculations, SpawnMethods, QueryMethods, Batches, Explain
# These are explicitly delegated to improve performance (avoids method_missing)
- delegate :to_xml, :to_yaml, :length, :collect, :map, :each, :all?, :include?, :to => :to_a
+ delegate :to_xml, :to_yaml, :length, :collect, :map, :each, :all?, :include?, :to_ary, :to => :to_a
+ delegate :ast, :engine, :to => :arel
delegate :table_name, :quoted_table_name, :primary_key, :quoted_primary_key,
:connection, :columns_hash, :auto_explain_threshold_in_seconds, :to => :klass

0 comments on commit 1af2a1d

Please sign in to comment.