Method: Spree::Variant#option_value
- Defined in:
- app/models/spree/variant.rb
#option_value(opt_name) ⇒ String
Fetches the option value for the given option name.
283 284 285 |
# File 'app/models/spree/variant.rb', line 283 def option_value(opt_name) option_values.detect { |o| o.option_type.name == opt_name }.try(:presentation) end |