Closed patbenatar closed 3 years ago
It would be great to be able to add data to the root context with create_context from the controller:
create_context
class MyController def index create_context(:thing, "foo") end end
to later be accessed by components within the render hierarchy of this controller action.
Unfortunately, in Rails, view_context is a different object (unique Object ID) in the controller than it is in the view.
view_context
It would be great to be able to add data to the root context with
create_context
from the controller:to later be accessed by components within the render hierarchy of this controller action.
Unfortunately, in Rails,
view_context
is a different object (unique Object ID) in the controller than it is in the view.