# Helpers when broadcasting partials

**URL:** <https://discuss.hotwired.dev/t/helpers-when-broadcasting-partials/2938>\
**Category:** General\
**Created:** [June 8, 2021, 3:03am UTC](https://discuss.hotwired.dev/t/helpers-when-broadcasting-partials/2938 "2021-06-08T03:03:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ldd](https://yyz1.discourse-cdn.com/flex027/user_avatar/discuss.hotwired.dev/ldd/32/2043_2.png) [@ldd](https://discuss.hotwired.dev/u/ldd)\
**Post date:** [June 8, 2021, 3:03am UTC](https://discuss.hotwired.dev/t/helpers-when-broadcasting-partials/2938/1 "2021-06-08T03:03:10Z")

</div>

When we are subscribing to a stream with `<%= turbo_stream_from 'admin_console' %>`, and broadcasting updated partials when a model is changed  
(ie: `after_update_commit -> { broadcast_replace_to('admin_console', partial: '/admin/menu/uplink_status', target: "uplink_status_#{id}", locals: { record: self }) }`)  
how can we influence the rendering context? If the partial references helper methods, they are not available in the view. I’ve resorted to doing something like this within the partial, which just feels… wrong:

`<% self.extend(AdminHelper) %>`

Can anyone suggest a better way to make helpers available within the partials rendered via model callback? I do realize this starts to blur the MVC lines, but there has to be some way to control the context without my hacky solution. I looked through the souce and see that ultimately it comes down to the call from the `render_format` method to `ApplicationController.render(formats: [format], **rendering)` but I couldn’t find any options that can be passed into the rendering hash that would influence the view context, but maybe I just missed something?

Thanks in advance!
