Use Ruby on Rails App Helpers with shopify_gem

If you’re reading this, you’re probably confused why the helper functions in helpers/application_helper.rb aren’t working within your Shopify app.

My favorite fix for this is to add a small snippet of code to config/application.rb:

config.to_prepare do
   ShopifyApp::AuthenticatedController.helper ShopifyRoRAppName::Application.helpers

It is very important to replace the ShopifyRoRAppName with your own RoR app’s name. For reference, it should be right above where you place the code: