Set rubocop TargetRubyVersion: 2.3
This commit is contained in:
parent
f6f2c78bb7
commit
49397aca6f
|
@ -15,7 +15,7 @@ AllCops:
|
|||
- spec/dummy_app/db/schema.rb # Generated, out of our control
|
||||
|
||||
# Set to lowest supported version
|
||||
TargetRubyVersion: 2.2
|
||||
TargetRubyVersion: 2.3
|
||||
|
||||
Layout/AlignParameters:
|
||||
EnforcedStyle: with_fixed_indentation
|
||||
|
|
|
@ -156,7 +156,7 @@ module PaperTrail
|
|||
|
||||
# @api public
|
||||
def transaction?
|
||||
::ActiveRecord::Base.connection.open_transactions > 0
|
||||
::ActiveRecord::Base.connection.open_transactions.positive?
|
||||
end
|
||||
|
||||
# @api public
|
||||
|
|
|
@ -500,7 +500,7 @@ module PaperTrail
|
|||
end
|
||||
|
||||
def log_version_errors(version, action)
|
||||
version.logger && version.logger.warn(
|
||||
version.logger&.warn(
|
||||
"Unable to create version for #{action} of #{@record.class.name}" +
|
||||
"##{@record.id}: " + version.errors.full_messages.join(", ")
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue