end
input_type = 'text'
- case object.class.attribute_info[attr.to_sym].andand[:type]
- when 'text'
+ attrtype = object.class.attribute_info[attr.to_sym].andand[:type]
+ if attrtype == 'text' or attr == 'description'
input_type = 'textarea'
- when 'datetime'
+ elsif attrtype == 'datetime'
input_type = 'date'
else
input_type = 'text'
@unique_id ||= (Time.now.to_f*1000000).to_i
span_id = object.uuid.to_s + '-' + attr.to_s + '-' + (@unique_id += 1).to_s
- if attr == 'description'
- input_type = 'textarea'
- end
span_tag = content_tag 'span', rendervalue, {
"data-emptytext" => '(none)',
"data-placement" => "bottom",