Merge pull request #9718 from mkllnk/style

Use standard ApplicationRecord in task class
This commit is contained in:
Maikel
2022-10-06 09:42:29 +11:00
committed by GitHub
3 changed files with 2 additions and 10 deletions

View File

@@ -699,12 +699,6 @@ Rails/ApplicationMailer:
Exclude:
- 'app/mailers/spree/base_mailer.rb'
# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
Rails/ApplicationRecord:
Exclude:
- 'lib/tasks/data/remove_transient_data.rb'
# Offense count: 5
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: NilOrEmpty, NotPresent, UnlessPresent.

View File

@@ -1,12 +1,10 @@
# frozen_string_literal: true
require 'highline'
require 'tasks/data/remove_transient_data'
namespace :ofn do
namespace :data do
desc 'Remove transient data'
task remove_transient_data: :environment do
require 'tasks/data/remove_transient_data'
RemoveTransientData.new.call
end
end

View File

@@ -6,7 +6,7 @@ class RemoveTransientData
# This model lets us operate on the sessions DB table using ActiveRecord's
# methods within the scope of this service. This relies on the AR's
# convention where a Session model maps to a sessions table.
class Session < ActiveRecord::Base
class Session < ApplicationRecord
end
def call