Fix some easy rubocop issues

This commit is contained in:
Pau Perez
2020-07-28 19:01:14 +02:00
parent ebf9be41bb
commit be3a10b2b1
5 changed files with 7 additions and 7 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -91,4 +91,4 @@ module DelegateBelongsTo
protected :delegator_for
end
ActiveRecord::Base.__send__(:include, DelegateBelongsTo)
ActiveRecord::Base.include(DelegateBelongsTo)

View File

@@ -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)

View File

@@ -1,3 +1,3 @@
# frozen_string_literal: true
Spree::BaseController.__send__(:include, Spree::ViewContext)
Spree::BaseController.include(Spree::ViewContext)