diff options
author | wangjohn <wangjohn@mit.edu> | 2013-04-01 18:16:47 -0400 |
---|---|---|
committer | wangjohn <wangjohn@mit.edu> | 2013-04-01 18:34:21 -0400 |
commit | a605c441b9588930679888108ba134f01d617872 (patch) | |
tree | 7abf08f5faa8a0086218cf8e70986eb54c155033 /activerecord/lib | |
parent | 78defbb78ee6ddf804340a54eaad28f4e0ea723f (diff) | |
download | rails-a605c441b9588930679888108ba134f01d617872.tar.gz rails-a605c441b9588930679888108ba134f01d617872.tar.bz2 rails-a605c441b9588930679888108ba134f01d617872.zip |
Updated the error message for +find+ on an inverse_of association
so that it is consistent with the error thrown for +find+ without an
inverse_of association.
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/associations/collection_association.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/collection_association.rb b/activerecord/lib/active_record/associations/collection_association.rb index 79e626f67e..2a00ac1386 100644 --- a/activerecord/lib/active_record/associations/collection_association.rb +++ b/activerecord/lib/active_record/associations/collection_association.rb @@ -83,7 +83,7 @@ module ActiveRecord find_by_scan(*args) elsif options[:inverse_of] args = args.flatten - raise RecordNotFound, "Must specify an id to find" if args.blank? + raise RecordNotFound, "Couldn't find #{scope.klass.name} without an ID" if args.blank? result = find_by_scan(*args) |