How can I access this helper function in production?

Viewed 439

I'm using private_pub for pushing notifications to subscribed clients to my users. In my application.html.haml I have:

...
= javascript_include_tag 'application'
= subscribe_to "/#{@user.access_token}/notifications"
...

The subscribe_to helper works fine in development. When deployed to production, the following error is logged:

ActionView::Template::Error (undefined method `subscribe_to' for #<#<Class:0x00000001f372e8>:0x00000001fded90>):
    5:     = stylesheet_link_tag 'application', :media => 'all'
    6:     = include_gon(:init => true)
    7:     = javascript_include_tag 'application'
    8:     = subscribe_to "/#{@user.access_token}/notifications"
    9:     = csrf_meta_tags
    10: 
    11:   %body
  app/views/layouts/application.html.haml:8:in `_app_views_layouts_application_html_haml__1867651381877570337_14592040'

How can I get access to this helper method in my production environment?

2 Answers
Related