From 867a9cbbb818bb4f0d3990403c554a632f367944 Mon Sep 17 00:00:00 2001 From: James Wen Date: Thu, 28 Jan 2016 00:41:26 -0500 Subject: Improve clarity of error message for missing includes and eager_load relations --- activerecord/lib/active_record/associations/join_dependency.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib/active_record/associations/join_dependency.rb') diff --git a/activerecord/lib/active_record/associations/join_dependency.rb b/activerecord/lib/active_record/associations/join_dependency.rb index 0e4e951269..b94feeff12 100644 --- a/activerecord/lib/active_record/associations/join_dependency.rb +++ b/activerecord/lib/active_record/associations/join_dependency.rb @@ -228,7 +228,7 @@ module ActiveRecord def find_reflection(klass, name) klass._reflect_on_association(name) or - raise ConfigurationError, "Association named '#{ name }' was not found on #{ klass.name }; perhaps you misspelled it?" + raise ConfigurationError, "Can't join '#{ klass.name }' to association named '#{ name }'; perhaps you misspelled it?" end def build(associations, base_klass) -- cgit v1.2.3