Skip to content

Commit

Permalink
Nerfed remotipart_response
Browse files Browse the repository at this point in the history
  • Loading branch information
ajrkerr authored and JangoSteve committed Aug 26, 2011
1 parent d1182e4 commit 2647ce9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
12 changes: 3 additions & 9 deletions lib/remotipart/view_helper.rb
@@ -1,15 +1,9 @@
module Remotipart
module ViewHelper
#No longer used
#Retrained to prevent issues while updating
def remotipart_response(options = {}, &block)
content = with_output_buffer(&block)
if remotipart_submitted?
#Add the data-type option to the text area
options = {:'data-type' => response.content_type}.merge(options)
response.content_type = Mime::HTML
text_area_tag('remotipart_response', String.new(content), options)
else
content
end
with_output_buffer(&block)
end
end
end
2 changes: 1 addition & 1 deletion vendor/assets/javascripts/jquery.iframe-transport.js
Expand Up @@ -193,7 +193,7 @@
root = doc.documentElement ? doc.documentElement : doc.body,
textarea = root.getElementsByTagName("textarea")[0],
type = textarea ? textarea.getAttribute("data-type") : null;

var status = 200,
statusText = "OK",
responses = { text: type ? textarea.value : root ? root.innerHTML : null },
Expand Down

0 comments on commit 2647ce9

Please sign in to comment.