Sha256: eee3f95792c6902b4800d115c506a2dc5b5191cd01ac6202b41e13230dffcee8
Contents?: true
Size: 712 Bytes
Versions: 5
Compression:
Stored size: 712 Bytes
Contents
module InlineFormsHelper InlineForms::SPECIAL_MIGRATION_TYPES[:geo_code_curacao]=:string # geo_code_curacao def geo_code_curacao_show(object, attribute, values) attribute_value = object.send(attribute)._presentation rescue nil link_to_inline_edit object, attribute, attribute_value, nil end def geo_code_curacao_edit(object, attribute, values) text_field_with_auto_complete :geo_code_curacao, :street, :skip_style => true end def geo_code_curacao_update(object, attribute, values) # extract the geocode geo_code = params[attribute.to_sym][:street].scan(/\d\d\d\d\d\d/).to_s || nil object[attribute.to_sym] = GeoCodeCuracao.new(geo_code).valid? ? geo_code : nil end end
Version data entries
5 entries across 5 versions & 1 rubygems