Module: SolidusFriendlyPromotions::Admin::ConditionsHelper

Defined in:
app/helpers/solidus_friendly_promotions/admin/conditions_helper.rb

Instance Method Summary collapse

Instance Method Details

#options_for_condition_types(benefit, condition) ⇒ Object



6
7
8
9
# File 'app/helpers/solidus_friendly_promotions/admin/conditions_helper.rb', line 6

def options_for_condition_types(benefit, condition)
  options = benefit.available_conditions.map { |condition| [condition.model_name.human, condition.name] }
  options_for_select(options, condition&.type.to_s)
end