Sha256: 2a9cb24dac3cb912e43dc604d504b954963fe8689f47229ea0a6fe47bd5b13a7
Contents?: true
Size: 761 Bytes
Versions: 32
Compression:
Stored size: 761 Bytes
Contents
module RefinerySettingsHelper def form_value_type @refinery_setting.form_value_type.presence || 'text_area' end def refinery_setting_title(f) if @refinery_setting.form_value_type == 'check_box' raw "<h3>#{@refinery_setting.name.to_s.titleize}?</h3>" else f.label :value end end def refinery_setting_field(f, help) case form_value_type when 'check_box' raw "#{f.check_box :value, :value => @refinery_setting.form_value} #{f.label :value, help.presence || t('enabled', :scope => 'admin.refinery_settings.form'), :class => 'stripped'}" else f.text_area :value, :value => @refinery_setting.form_value, :class => 'widest', :rows => 5 end end end
Version data entries
32 entries across 32 versions & 2 rubygems