Module: SolidusContent::Provider::Fields
Instance Method Summary collapse
Instance Method Details
#provider_based_attr_reader(attrs) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'app/models/solidus_content/provider/fields.rb', line 6 def provider_based_attr_reader(attrs) attrs.each do |attr| define_singleton_method(attr) do [attr.to_s] || '' end define_singleton_method("#{attr}=") do |value| attribute_will_change!(:options) [attr.to_s] = value end end end |