Giter Club home page Giter Club logo

Comments (3)

ageweke avatar ageweke commented on September 3, 2024

Thanks for letting me know! I just pushed a fix for this to master. It actually works both ways, allowing you to invoke a Fortitude widget from Erector, and an Erector widget from Fortitude, using just the normal #widget method.

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 :delegate_object should be :parent or not. Because we’re also passing :output_buffer_holder and :helpers_object, the only thing the :delegate_object would be used for is grabbing instance variables from the controller, which, in turn, only happens if you turn on implicit_shared_variable_access in Fortitude (IMHO, a really bad idea) or access them via the shared_variables Hash-like object (also probably a bad idea), so it’s not something I would really expect almost anybody to run into. But still thought it was worth asking about.)

from fortitude.

ageweke avatar ageweke commented on September 3, 2024

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.

from fortitude.

ajb avatar ajb commented on September 3, 2024

Thanks! This works great, and re: corner cases, this is already leagues beyond what I would say Fortitude should be responsible for.

from fortitude.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.