You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
view component is a library used by Github which grows in popularity for replacing partials.
I made a Proof of concept by patching into ViewComponent render method:
It then uses the Ruby object's name as template address. One could optimize the path extraction, but maybe someone else want's to pick up the POC and work this into this library.
The text was updated successfully, but these errors were encountered:
if defined? Xray
module XRayPatch
def render_in(*args)
result = super
path = self.class.source_location
Xray.augment_template(ActiveSupport::SafeBuffer.new(result), path)
end
end
ViewComponent::Base.prepend(XRayPatch)
end
view component is a library used by Github which grows in popularity for replacing partials.
I made a Proof of concept by patching into ViewComponent render method:
It then uses the Ruby object's name as template address. One could optimize the path extraction, but maybe someone else want's to pick up the POC and work this into this library.
The text was updated successfully, but these errors were encountered: