Fix new linting violations

This commit is contained in:
Andrew Tomaka 2023-10-10 22:50:10 -04:00
parent 0b261eb309
commit 3ae931074b
Signed by: atomaka
GPG key ID: 61209BF70A5B18BE
6 changed files with 20 additions and 19 deletions

View file

@ -14,7 +14,7 @@ module FamilyBudget
# Please, add to the `ignore` list any other `lib` subdirectories that do
# not contain `.rb` files, or that should not be reloaded or eager loaded.
# Common ones are `templates`, `generators`, or `middleware`, for example.
config.autoload_lib(ignore: %w(assets tasks))
config.autoload_lib(ignore: %w[assets tasks])
# Configuration for the application, engines, and railties goes here.
#

View file

@ -52,7 +52,7 @@ Rails.application.configure do
config.force_ssl = true
# Log to STDOUT by default
config.logger = ActiveSupport::Logger.new(STDOUT)
config.logger = ActiveSupport::Logger.new($stdout)
.tap { |logger| logger.formatter = ::Logger::Formatter.new }
.then { |logger| ActiveSupport::TaggedLogging.new(logger) }

View file

@ -6,7 +6,7 @@ class AddServiceNameToActiveStorageBlobs < ActiveRecord::Migration[6.0]
unless column_exists?(:active_storage_blobs, :service_name)
add_column :active_storage_blobs, :service_name, :string
if configured_service = ActiveStorage::Blob.service.name
if (configured_service = ActiveStorage::Blob.service.name)
ActiveStorage::Blob.unscoped.update_all(service_name: configured_service)
end

View file

@ -14,6 +14,7 @@ class CreateActiveStorageVariantRecords < ActiveRecord::Migration[6.0]
end
private
def primary_key_type
config = Rails.configuration.generators
config.options[config.orm][:primary_key_type] || :primary_key