From 048c6a8ee88388d2fb4a5bc29d479523b3eef280 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Thu, 9 Apr 2015 10:03:04 +1000 Subject: [PATCH] Include only the bare minimum of helpers into JS template context to avoid intermittent SASS @include issues --- config/initializers/js_template_helpers.rb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/config/initializers/js_template_helpers.rb b/config/initializers/js_template_helpers.rb index c3772dc443..27fffc9655 100644 --- a/config/initializers/js_template_helpers.rb +++ b/config/initializers/js_template_helpers.rb @@ -2,7 +2,12 @@ # https://github.com/pitr/angular-rails-templates/issues/45#issuecomment-43229086 Rails.application.assets.context_class.class_eval do - include ApplicationHelper - include ActionView::Helpers - include Rails.application.routes.url_helpers + # include ApplicationHelper + # include ActionView::Helpers + # include Rails.application.routes.url_helpers + + # Including all of the helpers (above) has caused some intermittent CSS include issues + # (not finding mixins from an @include in sass). Therefore, we're only including the + # bare minimum here. + include ActionView::Helpers::TranslationHelper end