File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -17,12 +17,12 @@ def get(key)
17
17
18
18
# Called by each renderer object to set the layout contents.
19
19
def set ( key , value )
20
- @content [ key ] = ActiveSupport ::SafeBuffer . new ( value )
20
+ @content [ key ] = ActiveSupport ::SafeBuffer . new ( value . to_s )
21
21
end
22
22
23
23
# Called by content_for
24
24
def append ( key , value )
25
- @content [ key ] << value
25
+ @content [ key ] << value . to_s
26
26
end
27
27
alias_method :append! , :append
28
28
end
Original file line number Diff line number Diff line change @@ -51,14 +51,14 @@ def test_content_for_used_for_read
51
51
def test_content_for_with_multiple_calls
52
52
assert_not content_for? ( :title )
53
53
content_for :title , "foo"
54
- content_for :title , " bar"
54
+ content_for :title , : bar
55
55
assert_equal "foobar" , content_for ( :title )
56
56
end
57
57
58
58
def test_content_for_with_multiple_calls_and_flush
59
59
assert_not content_for? ( :title )
60
60
content_for :title , "foo"
61
- content_for :title , " bar" , flush : true
61
+ content_for :title , : bar, flush : true
62
62
assert_equal "bar" , content_for ( :title )
63
63
end
64
64
@@ -172,7 +172,7 @@ def test_provide
172
172
assert_equal "hi<p>title</p>" , content_for ( :title )
173
173
174
174
@view_flow = ActionView ::OutputFlow . new
175
- provide :title , "hi"
175
+ provide :title , :hi
176
176
provide :title , raw ( "<p>title</p>" )
177
177
assert_equal "hi<p>title</p>" , content_for ( :title )
178
178
end
You can’t perform that action at this time.
0 commit comments