diff options
author | brainopia <brainopia@evilmartians.com> | 2015-04-02 02:11:07 +0300 |
---|---|---|
committer | brainopia <brainopia@evilmartians.com> | 2015-04-02 02:15:07 +0300 |
commit | 58d75fd8112d27c0f4bdd004e10b4f4e8b350595 (patch) | |
tree | 2708205fb412b55f1dea947da22aaed47c1fd485 /activerecord/lib/active_record/associations/builder | |
parent | cdac52e124769909b6cb5fce2c4d00e09d21e059 (diff) | |
download | rails-58d75fd8112d27c0f4bdd004e10b4f4e8b350595.tar.gz rails-58d75fd8112d27c0f4bdd004e10b4f4e8b350595.tar.bz2 rails-58d75fd8112d27c0f4bdd004e10b4f4e8b350595.zip |
Freeze static arguments for gsub
Diffstat (limited to 'activerecord/lib/active_record/associations/builder')
-rw-r--r-- | activerecord/lib/active_record/associations/builder/has_and_belongs_to_many.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/builder/has_and_belongs_to_many.rb b/activerecord/lib/active_record/associations/builder/has_and_belongs_to_many.rb index f578219028..97b57a6a55 100644 --- a/activerecord/lib/active_record/associations/builder/has_and_belongs_to_many.rb +++ b/activerecord/lib/active_record/associations/builder/has_and_belongs_to_many.rb @@ -85,7 +85,7 @@ module ActiveRecord::Associations::Builder def middle_reflection(join_model) middle_name = [lhs_model.name.downcase.pluralize, - association_name].join('_').gsub('::', '_').to_sym + association_name].join('_'.freeze).gsub('::'.freeze, '_'.freeze).to_sym middle_options = middle_options join_model HasMany.create_reflection(lhs_model, |