Sha256: 8020463c677e4cd4eaef6015bd74e77af25a91c898a9136ee392a6207d96ecb8

Contents?: true

Size: 538 Bytes

Versions: 68

Compression:

Stored size: 538 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[attribute].blank? ? "<i class='fi-plus'></i>".html_safe : object[attribute]
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

68 entries across 68 versions & 1 rubygems

Version Path
inline_forms-3.1.0 lib/app/helpers/form_elements/text_field.rb
inline_forms-3.0.58 lib/app/helpers/form_elements/text_field.rb
inline_forms-3.0.57 lib/app/helpers/form_elements/text_field.rb
inline_forms-3.0.56 lib/app/helpers/form_elements/text_field.rb
inline_forms-3.0.55 lib/app/helpers/form_elements/text_field.rb
inline_forms-3.0.54 lib/app/helpers/form_elements/text_field.rb
inline_forms-3.0.53 lib/app/helpers/form_elements/text_field.rb
inline_forms-3.0.52 lib/app/helpers/form_elements/text_field.rb
inline_forms-3.0.51 lib/app/helpers/form_elements/text_field.rb
inline_forms-3.0.50 lib/app/helpers/form_elements/text_field.rb
inline_forms-3.0.49 lib/app/helpers/form_elements/text_field.rb
inline_forms-3.0.48 lib/app/helpers/form_elements/text_field.rb
inline_forms-3.0.47 lib/app/helpers/form_elements/text_field.rb
inline_forms-3.0.46 lib/app/helpers/form_elements/text_field.rb
inline_forms-3.0.45 lib/app/helpers/form_elements/text_field.rb
inline_forms-3.0.44 lib/app/helpers/form_elements/text_field.rb
inline_forms-3.0.43 lib/app/helpers/form_elements/text_field.rb
inline_forms-3.0.42 lib/app/helpers/form_elements/text_field.rb
inline_forms-3.0.41 lib/app/helpers/form_elements/text_field.rb
inline_forms-3.0.40 lib/app/helpers/form_elements/text_field.rb