From d32ea002427f419cc9e00f2a9445e7329ba09fdd Mon Sep 17 00:00:00 2001 From: Philip Claren Date: Tue, 14 Apr 2015 14:15:37 +0200 Subject: [PATCH] Rails 4 fix --- lib/truncate_html.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/truncate_html.rb b/lib/truncate_html.rb index 95b7923..49c0812 100644 --- a/lib/truncate_html.rb +++ b/lib/truncate_html.rb @@ -10,5 +10,7 @@ config.word_boundary = /\S/ end - -ActionController::Base.helper(TruncateHtmlHelper) if defined?(ActionController) +if defined?(ActionController) + ActionController::Base.helper(TruncateHtmlHelper) + ActionView::Base.send(:include, TruncateHtmlHelper) +end