Ransack scope missing
Closed this issue · 1 comments
mickenorlen commented
Creating a free shipping discount. And then running:
SolidusFriendlyPromotions::ShippingRateDiscount.first.promotion_action
Gives
*** NameError Exception: undefined local variable or method `with_discarded' for #<ActiveRecord::Relation [#<SolidusFriendlyPromotions::Actions::AdjustLineItem
Related to:
class ShippingRateDiscount < Spree::Base
...
belongs_to :promotion_action, -> { with_discarded }, inverse_of: false
Not sure if above should be removed or if the following line from promotion.rb
should be integrated for promotion_action.rb
as well.
self.allowed_ransackable_scopes = %i[active with_discarded]