aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/template.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-06-10 16:29:58 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2011-06-10 16:29:58 -0700
commita4ee5038c15d339774852fc09e1418746b95c019 (patch)
tree29d3c64b622751d965f8bd128442d2084f8a6964 /actionpack/lib/action_view/template.rb
parentca312b6612e2c76aabd301807a1b63fc050e46d5 (diff)
parent115e80dccc65c3ed9a9750649d9ca4ea2a7e64f1 (diff)
downloadrails-a4ee5038c15d339774852fc09e1418746b95c019.tar.gz
rails-a4ee5038c15d339774852fc09e1418746b95c019.tar.bz2
rails-a4ee5038c15d339774852fc09e1418746b95c019.zip
Merge pull request #1642 from sikachu/master-render-inline
Render inline fix for master
Diffstat (limited to 'actionpack/lib/action_view/template.rb')
-rw-r--r--actionpack/lib/action_view/template.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/template.rb b/actionpack/lib/action_view/template.rb
index 10797c010f..9c59d18310 100644
--- a/actionpack/lib/action_view/template.rb
+++ b/actionpack/lib/action_view/template.rb
@@ -218,6 +218,9 @@ module ActionView
method_name = self.method_name
if source.encoding_aware?
+ # Avoid performing in-place mutation for SafeBuffer
+ @source = source.to_str if source.html_safe?
+
# Look for # encoding: *. If we find one, we'll encode the
# String in that encoding, otherwise, we'll use the
# default external encoding.