Permalink
Browse files

no need for extra method calls inside the framework

  • Loading branch information...
1 parent e9d44ef commit 2babe0ac45e29ba56a36dd9e6e70431993546f46 @tenderlove tenderlove committed Jan 9, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/reflection.rb
View
2 activerecord/lib/active_record/reflection.rb
@@ -175,7 +175,7 @@ def klass
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

0 comments on commit 2babe0a

Please sign in to comment.