Sha256: b6e1c0436b44745ae7c58eb73a00f3742605c419ffba1170db42c754ae5dff41
Contents?: true
Size: 615 Bytes
Versions: 24
Compression:
Stored size: 615 Bytes
Contents
# -*- encoding : utf-8 -*- InlineForms::SPECIAL_COLUMN_TYPES[:image_field]=:string def image_field_show(object, attribute) o = object.send(attribute) msg = "<i class='fi-plus'></i>".html_safe 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
24 entries across 24 versions & 1 rubygems