search for: print_todo

Displaying 1 result from an estimated 1 matches for "print_todo".

Did you mean: print_node
2006 Jul 05
3
Calling render_to_string from a view
I''m playing around with a list of todos, which I want to render as <ul>''s that can nest to an arbitrary level, so I wrote this as a helper method: def print_todo(t) str = "<ul>\n\t<li>" str += render_to_string(:partial => ''todo'', :object => t) + "\n" t.children.each { |c| str += print_todo(c) } str += "\n\t</li>\n</ul>" return str end...