diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2018-02-16 22:51:03 -0500 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2018-02-16 22:52:08 -0500 |
commit | e9f0861eb9d8d55172c765d5d4bbc6d363e87a09 (patch) | |
tree | df4f26911836755bb0b69e04193336dc92213cfa /activerecord/lib/active_record | |
parent | 7340596de45dc4c0f62a287b6acc4e71d8ee6c60 (diff) | |
download | rails-e9f0861eb9d8d55172c765d5d4bbc6d363e87a09.tar.gz rails-e9f0861eb9d8d55172c765d5d4bbc6d363e87a09.tar.bz2 rails-e9f0861eb9d8d55172c765d5d4bbc6d363e87a09.zip |
Fix frozen string concatenation by indicating that it's mutable
References 89bcca5
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/errors.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/errors.rb b/activerecord/lib/active_record/errors.rb index e4bc6e0d8b..c2a180c939 100644 --- a/activerecord/lib/active_record/errors.rb +++ b/activerecord/lib/active_record/errors.rb @@ -120,13 +120,13 @@ module ActiveRecord def initialize(adapter = nil, message: nil, table: nil, foreign_key: nil, target_table: nil, primary_key: nil) @adapter = adapter if table - msg = <<~EOM + msg = +<<~EOM Column `#{foreign_key}` on table `#{table}` has a type of `#{column_type(table, foreign_key)}`. This does not match column `#{primary_key}` on `#{target_table}`, which has type `#{column_type(target_table, primary_key)}`. To resolve this issue, change the type of the `#{foreign_key}` column on `#{table}` to be :integer. (For example `t.integer #{foreign_key}`). EOM else - msg = <<~EOM + msg = +<<~EOM There is a mismatch between the foreign key and primary key column types. Verify that the foreign key column type and the primary key of the associated table match types. EOM |