Sha256: 39274ba43b206185519743ad768dc8d5cccbcd50652132ae1d790c72d86fa975

Contents?: true

Size: 417 Bytes

Versions: 1

Compression:

Stored size: 417 Bytes

Contents

module InlineFormsHelper
  # text_field
  def text_field_show(object, attribute, values)
    link_to_inline_edit object, attribute, object.send(attribute), nil
  end
  def text_field_edit(object, attribute, values)
    text_field_tag attribute, object[attribute], :class => 'input_text_field'
  end
  def text_field_update(object, attribute, values)
    object[attribute.to_sym] = params[attribute.to_sym]
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
inline_forms-0.5.0 app/helpers/form_elements/text_field.rb