lib/generators/somatics/settings/settings_generator.rb in somatics3-generators-0.0.9 vs lib/generators/somatics/settings/settings_generator.rb in somatics3-generators-0.0.10

- old
+ new

@@ -57,23 +57,27 @@ else self.value end end - def input_field_type - case self.field_type + def input_field(form) + options = {} + input_field_type = case self.field_type when 'integer', 'string', 'float' 'text_field' when 'text' - self.mce_editable ? 'tinymce' : 'text_area' + options[:class] = 'mceEditor' + 'text_area' when 'boolean' 'check_box' else 'text_field' end + form.send(input_field_type, :value, options) end class SettingNotFound < Exception; end + RUBY end rescue nil end end