diff options
author | Xavier Noria <fxn@hashref.com> | 2017-07-02 13:50:25 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-02 13:50:25 -0700 |
commit | 92c29d82eb2f323bb1338a039229a66057a7d137 (patch) | |
tree | 050eea5a719faa416b64b804617f8755b6500e09 /activerecord/lib/active_record/relation | |
parent | f851e1f705f26d8f92f0fc1b265b20bc389d23cb (diff) | |
parent | f443460670576cd82a806a851b7124479e8325c9 (diff) | |
download | rails-92c29d82eb2f323bb1338a039229a66057a7d137.tar.gz rails-92c29d82eb2f323bb1338a039229a66057a7d137.tar.bz2 rails-92c29d82eb2f323bb1338a039229a66057a7d137.zip |
Merge branch 'master' into require_relative_2017
Diffstat (limited to 'activerecord/lib/active_record/relation')
-rw-r--r-- | activerecord/lib/active_record/relation/finder_methods.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/relation/finder_methods.rb b/activerecord/lib/active_record/relation/finder_methods.rb index df8909379f..eee0f36f63 100644 --- a/activerecord/lib/active_record/relation/finder_methods.rb +++ b/activerecord/lib/active_record/relation/finder_methods.rb @@ -334,14 +334,14 @@ module ActiveRecord name = @klass.name if ids.nil? - error = "Couldn't find #{name}" + error = "Couldn't find #{name}".dup error << " with#{conditions}" if conditions raise RecordNotFound.new(error, name) elsif Array(ids).size == 1 error = "Couldn't find #{name} with '#{key}'=#{ids}#{conditions}" raise RecordNotFound.new(error, name, key, ids) else - error = "Couldn't find all #{name.pluralize} with '#{key}': " + error = "Couldn't find all #{name.pluralize} with '#{key}': ".dup error << "(#{ids.join(", ")})#{conditions} (found #{result_size} results, but was looking for #{expected_size})" raise RecordNotFound.new(error, name, primary_key, ids) |