Skip to content

Commit 5203576

Browse files
committed
Move spree/preferences/persistable to app/
This file is currently only loaded when loading either `Spree::Calculator` or `Spree::PaymentMethod`. We can use Rails' autoloading mechanism instead. This makes running the spec for the `Preferable` module run through on its own.
1 parent 20441e9 commit 5203576

File tree

7 files changed

+0
-11
lines changed

7 files changed

+0
-11
lines changed
File renamed without changes.

core/app/models/spree/calculator.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# frozen_string_literal: true
22

3-
require 'spree/preferences/persistable'
4-
53
module Spree
64
class Calculator < Spree::Base
75
include Spree::Preferences::Persistable

core/app/models/spree/payment_method.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# frozen_string_literal: true
22

3-
require 'spree/preferences/persistable'
43
require 'spree/preferences/statically_configurable'
54

65
module Spree

legacy_promotions/app/models/spree/promotion_action.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# frozen_string_literal: true
22

3-
require 'spree/preferences/persistable'
4-
53
module Spree
64
# Base class for all types of promotion action.
75
#

legacy_promotions/app/models/spree/promotion_rule.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# frozen_string_literal: true
22

3-
require 'spree/preferences/persistable'
4-
53
module Spree
64
# Base class for all promotion rules
75
class PromotionRule < Spree::Base

promotions/app/models/solidus_promotions/benefit.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# frozen_string_literal: true
22

3-
require "spree/preferences/persistable"
4-
53
module SolidusPromotions
64
# Base class for all types of benefit.
75
#

promotions/app/models/solidus_promotions/condition.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# frozen_string_literal: true
22

3-
require "spree/preferences/persistable"
4-
53
module SolidusPromotions
64
class Condition < Spree::Base
75
include Spree::Preferences::Persistable

0 commit comments

Comments
 (0)