Permalink
Browse files

show name of the klass that has missing association

  • Loading branch information...
1 parent 6303cef commit 1bf4088aeb580e8e8353c058dd4caf6acffa1bbc Neeraj Singh committed Apr 2, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/associations/join_dependency.rb
@@ -109,7 +109,7 @@ def build(associations, parent = nil, join_type = Arel::InnerJoin)
case associations
when Symbol, String
reflection = parent.reflections[associations.intern] or
- raise ConfigurationError, "Association named '#{ associations }' was not found; perhaps you misspelled it?"
+ raise ConfigurationError, "Association named '#{ associations }' was not found on #{ parent.active_record.name }; perhaps you misspelled it?"
unless join_association = find_join_association(reflection, parent)
@reflections << reflection
join_association = build_join_association(reflection, parent)

0 comments on commit 1bf4088

Please sign in to comment.