mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Enable Lint/StringConversionInInterpolation
rubocop rule
To prevent redundant `to_s` like https://github.com/rails/rails/pull/32923#discussion_r189460008 automatically in the future.
This commit is contained in:
parent
15d00f04f4
commit
a77447f4da
4 changed files with 7 additions and 4 deletions
|
@ -162,6 +162,9 @@ Style/UnneededPercentQ:
|
|||
Lint/RequireParentheses:
|
||||
Enabled: true
|
||||
|
||||
Lint/StringConversionInInterpolation:
|
||||
Enabled: true
|
||||
|
||||
Style/RedundantReturn:
|
||||
Enabled: true
|
||||
AllowMultipleReturnValues: true
|
||||
|
|
|
@ -104,7 +104,7 @@ module ActiveRecord
|
|||
|
||||
if source_line
|
||||
if defined?(::Rails.root)
|
||||
app_root = "#{::Rails.root.to_s}/".freeze
|
||||
app_root = "#{::Rails.root}/"
|
||||
source_line = source_line.sub(app_root, "")
|
||||
end
|
||||
|
||||
|
|
|
@ -51,11 +51,11 @@ module FakeRecord
|
|||
end
|
||||
|
||||
def quote_table_name(name)
|
||||
"\"#{name.to_s}\""
|
||||
"\"#{name}\""
|
||||
end
|
||||
|
||||
def quote_column_name(name)
|
||||
"\"#{name.to_s}\""
|
||||
"\"#{name}\""
|
||||
end
|
||||
|
||||
def schema_cache
|
||||
|
|
|
@ -36,7 +36,7 @@ module ApplicationTests
|
|||
skip "PTY unavailable" unless available_pty?
|
||||
|
||||
File.open("#{app_path}/config/boot.rb", "w") do |f|
|
||||
f.puts "ENV['BUNDLE_GEMFILE'] = '#{Bundler.default_gemfile.to_s}'"
|
||||
f.puts "ENV['BUNDLE_GEMFILE'] = '#{Bundler.default_gemfile}'"
|
||||
f.puts "require 'bundler/setup'"
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue