-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rendering an Erector widget from inside Fortitude #16
Comments
Thanks for letting me know! I just pushed a fix for this to If you can take a look at the monkeypatch I’m applying to Erector and let me know if it seems correct, that’d be awesome. (There’s really only one corner case I’m uncertain about, which is whether the |
Oh, and I should mention: because Erector (last I saw) wrapped its output buffers and seemed to manipulate them independently of Rails, I’m virtually certain that more complex cases — like passing a block from Fortitude to Erector, or vice-versa — will have issues in them. Unless you see both a compelling need to fix this and a clear path to doing it reliably, I’m not inclined to fix it, as I think the output-buffer models involved are just too dissimilar. But the more simple cases should work just fine, including passing parameters, which are probably the most important anyway. |
Thanks! This works great, and re: corner cases, this is already leagues beyond what I would say Fortitude should be responsible for. |
Kinda a weird use case, I'll admit, but as we're converting over our applications from Erector -> Fortitude, they still have dependencies that include Erector widgets. I thought it would be as easy as:
But the problem is that the
ErectorWidget
doesn't have access to thehelpers
object, so if it tries to reference e.g.current_user
, it fails.Any advice on how to pass in either
parent
orhelpers
? Here a link to some related lines in the Erector codebase.The text was updated successfully, but these errors were encountered: