Module: SolidusFriendlyPromotions::Admin::BenefitsHelper
- Defined in:
- app/helpers/solidus_friendly_promotions/admin/benefits_helper.rb
Instance Method Summary collapse
- #options_for_benefit_calculator_types(benefit) ⇒ Object
- #options_for_benefit_types(benefit) ⇒ Object
Instance Method Details
#options_for_benefit_calculator_types(benefit) ⇒ Object
6 7 8 9 10 |
# File 'app/helpers/solidus_friendly_promotions/admin/benefits_helper.rb', line 6 def (benefit) calculators = benefit.available_calculators = calculators.map { |calculator| [calculator.model_name.human, calculator.name] } (, benefit.calculator_type.to_s) end |
#options_for_benefit_types(benefit) ⇒ Object
12 13 14 15 16 |
# File 'app/helpers/solidus_friendly_promotions/admin/benefits_helper.rb', line 12 def (benefit) benefits = SolidusFriendlyPromotions.config.actions = benefits.map { |action| [action.model_name.human, action.name] } (, benefit&.type&.to_s) end |