mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Fix some easy rubocop issues
This commit is contained in:
@@ -35,7 +35,7 @@ module Spree
|
||||
#
|
||||
# This method is defined within the core gem on purpose.
|
||||
# Some people may only wish to use the Core part of Spree.
|
||||
def self.config(&block)
|
||||
def self.config
|
||||
yield(Spree::Config)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -65,15 +65,15 @@ module Spree
|
||||
calculator.compute(calculable)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def self.model_name_without_spree_namespace
|
||||
to_s.tableize.gsub('/', '_').sub('spree_', '')
|
||||
end
|
||||
private_class_method :model_name_without_spree_namespace
|
||||
|
||||
def self.spree_calculators
|
||||
Rails.application.config.spree.calculators
|
||||
end
|
||||
private_class_method :spree_calculators
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -91,4 +91,4 @@ module DelegateBelongsTo
|
||||
protected :delegator_for
|
||||
end
|
||||
|
||||
ActiveRecord::Base.__send__(:include, DelegateBelongsTo)
|
||||
ActiveRecord::Base.include(DelegateBelongsTo)
|
||||
|
||||
@@ -71,5 +71,5 @@ module Spree
|
||||
end
|
||||
end
|
||||
|
||||
ActiveRecord::Base.__send__ :include, Spree::Core::Permalinks
|
||||
ActiveRecord::Relation.__send__ :include, Spree::Core::Permalinks
|
||||
ActiveRecord::Base.include(Spree::Core::Permalinks)
|
||||
ActiveRecord::Relation.include(Spree::Core::Permalinks)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
Spree::BaseController.__send__(:include, Spree::ViewContext)
|
||||
Spree::BaseController.include(Spree::ViewContext)
|
||||
|
||||
Reference in New Issue
Block a user