Displaying 1 result from an estimated 1 matches for "body_rend".
Did you mean:
body_len
2006 Sep 01
0
render file in helper causes WSOD
...ender :file=>... in a helper function, Rails dies with a
white-screen-of-death (with nothing about it in development.log), but it
works in a controller function, and other render functions (like render
:text) work in the helper function.
# in helper - results in WSOD
module PagesHelper
def body_render(page)
case page.type.name
when ''Markaby Template''
render :file=>page.file, :layout=>false # WSOD
when ''RedCloth Template''
RedCloth.new(page.body).to_html # works, btw
when ''Text''
render :text...