Skip to content

Commit

Permalink
Merge pull request #176 from xinminlabs/awesomecode-lint-ruby-perform…
Browse files Browse the repository at this point in the history
…ance-stringreplacement-48707

Auto corrected by following Lint Ruby Performance/StringReplacement
  • Loading branch information
flyerhzm committed Mar 20, 2021
2 parents 2bbda34 + 3d6c13f commit 2d68303
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rails/convert_active_record_dirty_5_0_to_5_1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def call_after_create

within_files 'app/{models,observers}/**/*.rb' do
within_node type: 'class' do
object_name = node.name.to_source.sub(/Observer$/, '').underscore.gsub(/\//, '_').tableize
object_name = node.name.to_source.sub(/Observer$/, '').underscore.tr('/', '_').tableize

with_node type: 'send', receiver: 'self', message: 'table_name=' do
if node.arguments[0].type == :str
Expand Down

0 comments on commit 2d68303

Please sign in to comment.