Rich,

On Tue, Jan 6, 2009 at 9:00 PM, Rich Morin <[email protected]> wrote:
> It works fine in a view, but not when I try to process it in
> a controller.  http://cfcl.com/twiki/bin/view/MBW/MobiExamples
> shows that other code is working fine in this context...

I'm not sure what is the problem,
but why don't you try to 'def self.as_is()' ?

   <% def self.as_is(&blk) ... %>

--
regards,
makoto kuwata

>
> As described in http://pastie.org/353595, I'm having trouble
> getting Erubis to handle code of the form:
>
> vvvvvvvvvv
> <%
>  def as_is(&blk)
>    text = capture(&blk)
>    "<p><pre>\n#{ h(text) }\n</pre>\n"
>  end
> %>
>
> Hi...
>
> <%= as_is do %>
> This life is only a test.
> Had this been your real life,
> you would have been told where to go
> and what to do.
> <% end =%>
>
> Ho...
> ^^^^^^^^^^
>
> It works fine in a view, but not when I try to process it in
> a controller.  http://cfcl.com/twiki/bin/view/MBW/MobiExamples
> shows that other code is working fine in this context...
>
> -r
> --
> http://www.cfcl.com/rdm            Rich Morin
> http://www.cfcl.com/rdm/resume     [email protected]
> http://www.cfcl.com/rdm/weblog     +1 650-873-7841
>
> Technical editing and writing, programming, and web development
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"merb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/merb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to