Sha256: efb2141e0e8af436dcc2b74c260ebe09ae997a92f50a2b6ae8c1887d6a1b6e82
Contents?: true
Size: 715 Bytes
Versions: 6
Compression:
Stored size: 715 Bytes
Contents
# -*- encoding : utf-8 -*- InlineForms::SPECIAL_COLUMN_TYPES[:image_field]=:string def image_field_show(object, attribute) # if object.send(attribute).send(:present?) # title = "Full Size: #{object.send(attribute).send(:url)}.<br />" + image_tag(object.send(attribute).send(:palm).send(:url)) # else # title = '' # end link_to_inline_edit object, attribute, object.send(attribute).send(:present?) ? image_tag(object.send(attribute).send(:palm).send(:url)) : object.send(attribute).to_s 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
6 entries across 6 versions & 1 rubygems