From 6fe14848f9831c890c3f194e86499d6d8bc03268 Mon Sep 17 00:00:00 2001 From: natdeanlewissoftwire Date: Tue, 9 Jan 2024 16:50:13 +0000 Subject: [PATCH] refactor: lint --- db/migrate/20240108152935_unread_migration.rb | 6 +++--- spec/views/layouts/application_layout_spec.rb | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/db/migrate/20240108152935_unread_migration.rb b/db/migrate/20240108152935_unread_migration.rb index 099e74b4a..6e615901a 100644 --- a/db/migrate/20240108152935_unread_migration.rb +++ b/db/migrate/20240108152935_unread_migration.rb @@ -6,7 +6,7 @@ class UnreadMigration < ActiveRecord::Migration[6.0] t.datetime :timestamp, null: false end - add_index ReadMark, [:reader_id, :reader_type, :readable_type, :readable_id], name: 'read_marks_reader_readable_index', unique: true + add_index ReadMark, %i[reader_id reader_type readable_type readable_id], name: "read_marks_reader_readable_index", unique: true end def self.down @@ -14,10 +14,10 @@ class UnreadMigration < ActiveRecord::Migration[6.0] end def self.create_options - options = '' + options = "" if defined?(ActiveRecord::ConnectionAdapters::Mysql2Adapter) \ && ActiveRecord::Base.connection.instance_of?(ActiveRecord::ConnectionAdapters::Mysql2Adapter) - options = 'DEFAULT CHARSET=latin1' + options = "DEFAULT CHARSET=latin1" end options end diff --git a/spec/views/layouts/application_layout_spec.rb b/spec/views/layouts/application_layout_spec.rb index eeb989cca..55e97bc20 100644 --- a/spec/views/layouts/application_layout_spec.rb +++ b/spec/views/layouts/application_layout_spec.rb @@ -56,7 +56,6 @@ RSpec.describe "layouts/application" do end context "with a notification present" do - context "when notification is shown on unauthenticated pages" do before do create(:notification, title: "Old notification title", show_on_unauthenticated_pages: true)