Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Ruby
Store erb block and alter scope of erb block eval?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Steve V, post: 4467228"] After some more experimenting, I have made a little more progress, but I'm still not able to use a compiled ERB template. <%r.data = %q{%> So close! <%=blah%> <%}%> The above rhtml code will get me a string into my class, but it isn't "\t\tSo close! <%=blah%>\n\t" as expected. Instead it is what appears to be some type of parsed string: "; _erbout.concat "\n" _erbout.concat "\t\tSo close! "; _erbout.concat((@blah).to_s); _erbout.concat "\n" _erbout.concat "\t"; " I can use eval() on the above, with the binding of the working class which sort of solves the problem. Can anyone tell me what piece I'm missing here to keep the code suitable for loading into an ERB template? Thanks, Steve [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
Store erb block and alter scope of erb block eval?
Top