diff options
author | Matthew Draper <matthew@trebex.net> | 2017-07-02 01:07:08 +0930 |
---|---|---|
committer | Matthew Draper <matthew@trebex.net> | 2017-07-02 01:07:12 +0930 |
commit | afb66a5a598ce4ac74ad84b125a5abf046dcf5aa (patch) | |
tree | 33d690f194f243a3fb63e69f8393ff46cc396249 /activerecord/lib/active_record/relation | |
parent | 9ecdcac16795854bd02f1addcf75b84d34bbdf86 (diff) | |
parent | 3d453b409d037a056d0bcd636a2e020cc7cef4a8 (diff) | |
download | rails-afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.tar.gz rails-afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.tar.bz2 rails-afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.zip |
Merge pull request #29506 from pat/frozen-string-literals
Make ActiveSupport frozen-string-literal friendly.
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) |