Forum: Redcloth access to helper method

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
stuefer manuel (Guest)
on 2009-06-25 18:27
(Received via mailing list)
Hi, does someone of you ever tried to put some helper methods in
database with some other text like this:

  h1. title
  <%= helper(id) %>

and get an output using RedCloth?! what I need is that the helper
function would be elaborated .. not only displayed as html

Gaspard B. (Guest)
on 2009-06-25 18:42
(Received via mailing list)
I am investigating something similar for zena using RubyLess (direct
parsing of ruby from db is *dangerous* to say the least):

While investigating on new ways to parse, extracting things such as
"<%= ... %>" or "{{... }}" is definitely an option.

For the moment, I just double parse the text and only extract "[label]
... [/label]" in a two step process:

1. remove [label]...[/label] from text and replace with a placeholder
2. parse with redcloth
3. replace placeholders by actual content


On Thu, Jun 25, 2009 at 4:18 PM, stuefer
This topic is locked and can not be replied to.