aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2012-01-09 14:38:21 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2012-01-09 14:38:21 -0800
commit2babe0ac45e29ba56a36dd9e6e70431993546f46 (patch)
treea1a4e9dbae364a11dd2898fc631be11d758b2b95 /activerecord
parente9d44efd7e4964ad723ec29d5d908d053b4711ca (diff)
downloadrails-2babe0ac45e29ba56a36dd9e6e70431993546f46.tar.gz
rails-2babe0ac45e29ba56a36dd9e6e70431993546f46.tar.bz2
rails-2babe0ac45e29ba56a36dd9e6e70431993546f46.zip
no need for extra method calls inside the framework
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/reflection.rb2
1 files changed, 1 insertions, 1 deletions
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