Sha256: 6b51a2439c3e056eda578c2caee425deab873d961ee2519ca97d4cd6b035b662

Contents?: true

Size: 269 Bytes

Versions: 4

Compression:

Stored size: 269 Bytes

Contents

AutoHtml.add_filter(:simple_format).with({}) do |text, html_options|
  require 'action_view'

  args = [text, {}, {:sanitize => false}]
  begin
    ActionView::Base.new.simple_format(*args) 
  rescue ArgumentError
    # Rails 2 support
    args.pop
    retry
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
auto_html-whistlerbrk-2.0.0.pre lib/auto_html/filters/simple_format.rb
auto_html-1.6.4 lib/auto_html/filters/simple_format.rb
auto_html-1.6.3 lib/auto_html/filters/simple_format.rb
auto_html-1.6.2 lib/auto_html/filters/simple_format.rb