.to_html on entry attributes
Frederick Ros
sl33p3r at free.fr
Thu Sep 1 18:06:14 EDT 2005
Johan Sørensen wrote :
| /Users/johan/Hobix/lib/hobix/out/quick.rb:124:in `load': Error
| `undefined method `to_html' for "\"Google\":http://
| google.com":String' in erb /path/to/skels/.... (Hobix::Out::QuickError)
|
| The yaml line looks like this:
| quote_note: "Google":http://google.com
|
|
| I've even tried lots of different approaches; RedCloth.new
| (entry.quote_note) directly in the view; an accessor in the Quote
| class that converts it to redcloth etc, but I either get the above
| error or the text non-textilized..
Hi,
This seems strange, as regarding your error it seems that you're trying
to apply the to_html method to a string ....
The easiest (but the crapest ?) would be to add something like:
class String
def to_html
RedCloth.new( self ).to_html
end
end
Best Regards,
--
Frederick Ros aka Sleeper -- sleeper at jabber.fr
Linux is obsolete
(Andrew Tanenbaum)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/hobix-is-the-way/attachments/20050902/24f6390a/attachment.bin
More information about the Hobix-is-the-way
mailing list