Browse Source

refactor: lint

pull/2131/head
natdeanlewissoftwire 2 years ago
parent
commit
6fe14848f9
  1. 6
      db/migrate/20240108152935_unread_migration.rb
  2. 1
      spec/views/layouts/application_layout_spec.rb

6
db/migrate/20240108152935_unread_migration.rb

@ -6,7 +6,7 @@ class UnreadMigration < ActiveRecord::Migration[6.0]
t.datetime :timestamp, null: false t.datetime :timestamp, null: false
end 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 end
def self.down def self.down
@ -14,10 +14,10 @@ class UnreadMigration < ActiveRecord::Migration[6.0]
end end
def self.create_options def self.create_options
options = '' options = ""
if defined?(ActiveRecord::ConnectionAdapters::Mysql2Adapter) \ if defined?(ActiveRecord::ConnectionAdapters::Mysql2Adapter) \
&& ActiveRecord::Base.connection.instance_of?(ActiveRecord::ConnectionAdapters::Mysql2Adapter) && ActiveRecord::Base.connection.instance_of?(ActiveRecord::ConnectionAdapters::Mysql2Adapter)
options = 'DEFAULT CHARSET=latin1' options = "DEFAULT CHARSET=latin1"
end end
options options
end end

1
spec/views/layouts/application_layout_spec.rb

@ -56,7 +56,6 @@ RSpec.describe "layouts/application" do
end end
context "with a notification present" do context "with a notification present" do
context "when notification is shown on unauthenticated pages" do context "when notification is shown on unauthenticated pages" do
before do before do
create(:notification, title: "Old notification title", show_on_unauthenticated_pages: true) create(:notification, title: "Old notification title", show_on_unauthenticated_pages: true)

Loading…
Cancel
Save