output of view() as String

8 views
Skip to first unread message

jnj

unread,
Aug 1, 2012, 2:15:02 PM8/1/12
to sca...@googlegroups.com
Hello,

I am trying to use view() in a way that I can capture its output as a string.

For example,

- val titleText = view(thing)
%strong{:title => {titleText}} Hello

This doesn't work because view() renders with the current RenderContext, and so its output appears inline. Is there a way to do this?

jnj

unread,
Aug 1, 2012, 2:22:52 PM8/1/12
to sca...@googlegroups.com
Nevermind, I will answer my own question! The answer is capture().
Reply all
Reply to author
Forward
0 new messages