Set rubocop TargetRubyVersion: 2.3

This commit is contained in:
Jared Beck 2017-12-10 23:01:21 -05:00
parent f6f2c78bb7
commit 49397aca6f
3 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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

View File

@ -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(", ")
)