Sha256: 983608740f08267bcfc498ca051ed7b6b6edabf289f583148f933a788e9a66aa

Contents?: true

Size: 487 Bytes

Versions: 2

Compression:

Stored size: 487 Bytes

Contents

# -*- encoding : utf-8 -*-
InlineForms::SPECIAL_COLUMN_TYPES[:text_field]=:string

def text_field_show(object, attribute)
  link_to_inline_edit object, attribute, (object.send attribute.to_sym)
end

def text_field_edit(object, attribute)
  text_field_tag attribute, (object.send attribute.to_sym), :class => 'input_text_field'  # for abide: , :required => true
end

def text_field_update(object, attribute)
  object.send :write_attribute, attribute.to_sym, params[attribute.to_sym]
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
inline_forms-1.6.50 lib/app/helpers/form_elements/text_field.rb
inline_forms-1.6.49 lib/app/helpers/form_elements/text_field.rb