olivernn / poirot

mustaches in your rails
http://olivernn.github.com/poirot
108 stars 21 forks source link

segmentation fault when rendering a partial #5

Closed dcu closed 12 years ago

dcu commented 13 years ago

I am rendering a haml partial inside a Poirot::View subclass, something like this

class IndexView
    def add_something
        render :partial  => "path/to/haml/partial"
    end
 end

the rails process crashes with SEG FAULT in the "render :partial" line

dcu commented 13 years ago

this seems to fix the issue:

view_context.render :partial => "path/to/partial"
olivernn commented 13 years ago

To be honest I haven't tried rendering another partial of a different template type from within a Poirot view.

Methods such as render are part of the view context, which I guess you have figured out by explicitly calling render on the view_context, if this is working for you I'm tempted to close this issue.