Skip to content

Commit

Permalink
Fix model class for new PromotionCodesController
Browse files Browse the repository at this point in the history
Unfortunately, our resource controller is hardcoded to look for a
`Spree::<model_name>` object, which obviously doesn't work with the new
promotion namespace.

Co-authored-by: Alistair Norman <[email protected]>
(cherry picked from commit 6ea8b43)
  • Loading branch information
adammathys committed Dec 6, 2024
1 parent a1038fd commit be96063
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ def create

private

def model_class
SolidusPromotions::PromotionCode
end

def load_promotion
@promotion = SolidusPromotions::Promotion
.accessible_by(current_ability, :show)
Expand Down

0 comments on commit be96063

Please sign in to comment.