Sha256: 7c09ac8f0a4c6fb33a3f0583104cbba0f8952da3bd3fd2980fd1e08d2f7ad2a6

Contents?: true

Size: 233 Bytes

Versions: 9

Compression:

Stored size: 233 Bytes

Contents

module TruncateHtmlHelper

  def truncate_html(html, options={})
    return '' if html.nil?
    html_string = TruncateHtml::HtmlString.new(html)
    TruncateHtml::HtmlTruncator.new(html_string).truncate(options).html_safe
  end

end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
truncate_html-0.9 lib/app/helpers/truncate_html_helper.rb
truncate_html_sentence-0.5.6 lib/app/helpers/truncate_html_helper.rb
truncate_html-0.5.5 lib/app/helpers/truncate_html_helper.rb
truncate_html-0.5.4 lib/app/helpers/truncate_html_helper.rb
truncate_html-0.5.3 lib/app/helpers/truncate_html_helper.rb
truncate_html-0.5.2 lib/app/helpers/truncate_html_helper.rb
truncate_html-0.5.1 lib/app/helpers/truncate_html_helper.rb
truncate_html-0.5.0 lib/app/helpers/truncate_html_helper.rb
truncate_html-0.4.0 lib/app/helpers/truncate_html_helper.rb