From 0ee351b428e038394d495c20a868d40ad3032e83 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 12 Jun 2013 16:36:36 -0700 Subject: remove unnecessary is_a check --- activerecord/lib/active_record/reflection.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'activerecord/lib/active_record') diff --git a/activerecord/lib/active_record/reflection.rb b/activerecord/lib/active_record/reflection.rb index 2ba89b13b7..5ea103f6e9 100644 --- a/activerecord/lib/active_record/reflection.rb +++ b/activerecord/lib/active_record/reflection.rb @@ -66,8 +66,7 @@ module ActiveRecord # Invoice.reflect_on_association(:line_items).macro # returns :has_many # def reflect_on_association(association) - reflection = reflections[association] - reflection if reflection.is_a?(AssociationReflection) + reflections[association] end # Returns an array of AssociationReflection objects for all associations which have :autosave enabled. -- cgit v1.2.3