Sha256: 9f25fe6d0f8caa0b6a9dd88a1bb489b05f5ebfd84e9115e9d56c4460479105d7
Contents?: true
Size: 586 Bytes
Versions: 95
Compression:
Stored size: 586 Bytes
Contents
# -*- encoding : utf-8 -*- InlineForms::SPECIAL_COLUMN_TYPES[:image_field]=:string def image_field_show(object, attribute) o = object.send(attribute) msg = o.to_s if o.send(:present?) if o.respond_to? :palm msg = image_tag(o.send(:palm).send(:url)) else msg = image_tag(o.send(:url)) end end link_to_inline_edit object, attribute, msg end def image_field_edit(object, attribute) file_field_tag attribute, :class => 'input_text_field' end def image_field_update(object, attribute) object.send(attribute.to_s + '=', params[attribute.to_sym]) end
Version data entries
95 entries across 95 versions & 1 rubygems