Skip to content

Commit

Permalink
Move Decorators to app/patches
Browse files Browse the repository at this point in the history
This follows the Flickwerk conventions and should help host apps with
lazy loading.
  • Loading branch information
mamhoff committed Dec 16, 2024
1 parent fb85816 commit c3c9c94
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module SolidusReviews
module Spree
module ProductsControllerDecorator
module ProductsControllerPatch
def self.prepended(base)
base.class_eval do
helper ::Spree::ReviewsHelper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module SolidusReviews
module Spree
module Api
module ApiHelpersDecorator
module ApiHelpersPatch
def self.prepended(base)
base.module_eval do
@@review_attributes = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module SolidusReviews
module Spree
module ProductDecorator
module ProductPatch
def self.prepended(base)
base.class_eval do
has_many :reviews
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module SolidusReviews
module Spree
module UserDecorator
module UserPatch
def self.prepended(base)
base.class_eval do
has_many :reviews, class_name: 'Spree::Review'
Expand Down

0 comments on commit c3c9c94

Please sign in to comment.