Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Improve delegate list to avoid method missing.

  • Loading branch information...
commit 1af2a1d0f569407a4b2b643c57a884920ec0fabc 1 parent 26e7400
@josevalim josevalim authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  activerecord/lib/active_record/relation.rb
View
3  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
Please sign in to comment.
Something went wrong with that request. Please try again.