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]>
  • Loading branch information
adammathys and AlistairNorman committed Nov 27, 2024
1 parent 2cb9ac1 commit 6ea8b43
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 6ea8b43

Please sign in to comment.