Sha256: 24486d3349854acc5423c2667299489ed094effda8fb2c131760c93f9a15597c

Contents?: true

Size: 556 Bytes

Versions: 124

Compression:

Stored size: 556 Bytes

Contents

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

def move_show(object, attribute)
  link_to_inline_edit object, attribute, "<i class='fi-plus'></i>".html_safe
end

def move_edit(object, attribute)
  values = object.class.send :hash_tree_to_collection
    select( ('_' + object.class.to_s.underscore).to_sym, attribute, values, :selected => object.id )
end

def move_update(object, attribute)
  target = object.class.find_by_id(params['_' + object.class.to_s.underscore][attribute.to_sym])
  target.add_child(object)
end

Version data entries

124 entries across 124 versions & 1 rubygems

Version Path
inline_forms-6.2.14 app/helpers/form_elements/move.rb
inline_forms-6.2.12 app/helpers/form_elements/move.rb
inline_forms-6.2.11 app/helpers/form_elements/move.rb
inline_forms-6.2.10 app/helpers/form_elements/move.rb
inline_forms-6.2.9 app/helpers/form_elements/move.rb
inline_forms-6.2.7 app/helpers/form_elements/move.rb
inline_forms-6.2.6 app/helpers/form_elements/move.rb
inline_forms-6.2.5 app/helpers/form_elements/move.rb
inline_forms-6.2.4 app/helpers/form_elements/move.rb
inline_forms-6.2.3 app/helpers/form_elements/move.rb
inline_forms-6.2.2 app/helpers/form_elements/move.rb
inline_forms-6.2.1 app/helpers/form_elements/move.rb
inline_forms-6.1.1 app/helpers/form_elements/move.rb
inline_forms-6.1.0 app/helpers/form_elements/move.rb
inline_forms-6.0.8 app/helpers/form_elements/move.rb
inline_forms-6.0.7 app/helpers/form_elements/move.rb
inline_forms-6.0.6 app/helpers/form_elements/move.rb
inline_forms-6.0.5 app/helpers/form_elements/move.rb
inline_forms-6.0.4 app/helpers/form_elements/move.rb
inline_forms-6.0.3 app/helpers/form_elements/move.rb