From 2babe0ac45e29ba56a36dd9e6e70431993546f46 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 9 Jan 2012 14:38:21 -0800 Subject: no need for extra method calls inside the framework --- activerecord/lib/active_record/reflection.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord') diff --git a/activerecord/lib/active_record/reflection.rb b/activerecord/lib/active_record/reflection.rb index 60b73e9fe5..f02f0544c5 100644 --- a/activerecord/lib/active_record/reflection.rb +++ b/activerecord/lib/active_record/reflection.rb @@ -175,7 +175,7 @@ module ActiveRecord def initialize(macro, name, options, active_record) super - @collection = macro.in?([:has_many, :has_and_belongs_to_many]) + @collection = [:has_many, :has_and_belongs_to_many].include?(macro) end # Returns a new, unsaved instance of the associated class. +options+ will -- cgit v1.2.3