mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Merge pull request #9718 from mkllnk/style
Use standard ApplicationRecord in task class
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user