Sha256: 9e0029e9911f2080ecabef79ca8dba4fcf201657484e07c997fc0f46d88bb6bd
Contents?: true
Size: 678 Bytes
Versions: 14
Compression:
Stored size: 678 Bytes
Contents
require 'rails' module Prime module Rails module Utils protected def p_ajax_resp(options = {}) options = options.stringify_keys output = "<partial-response>" output += "<changes>" options['update'] = {} if !options.has_key?('update') options['update'].each do |update| update = update.stringify_keys updateid = update['id'] updateresp = update['resp'] output += %{<update id="#{updateid}"><![CDATA[#{updateresp}]]></update>} end output += "</changes>" output += "</partial-response>" end end end end
Version data entries
14 entries across 14 versions & 1 rubygems