aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2014-07-31 23:10:47 -0300
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2014-07-31 23:10:50 -0300
commit20405e516b031db4d8230014d1dcf9601ed0a0f8 (patch)
treeb014c7720da02f6e96b3323a49214d63180b55b8 /activerecord/lib
parentfe24ba881a676c5119498c4d6362a4827bf695ba (diff)
downloadrails-20405e516b031db4d8230014d1dcf9601ed0a0f8.tar.gz
rails-20405e516b031db4d8230014d1dcf9601ed0a0f8.tar.bz2
rails-20405e516b031db4d8230014d1dcf9601ed0a0f8.zip
Use available method rather than macro name checking
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/associations/through_association.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/through_association.rb b/activerecord/lib/active_record/associations/through_association.rb
index f00fef8b9e..24cb5ab545 100644
--- a/activerecord/lib/active_record/associations/through_association.rb
+++ b/activerecord/lib/active_record/associations/through_association.rb
@@ -77,7 +77,7 @@ module ActiveRecord
end
def ensure_mutable
- if source_reflection.macro != :belongs_to
+ unless source_reflection.belongs_to?
raise HasManyThroughCantAssociateThroughHasOneOrManyReflection.new(owner, reflection)
end
end