lib/auto_html.rb in auto_html-1.6.4 vs lib/auto_html.rb in auto_html-2.0.0
- old
+ new
@@ -1,17 +1,11 @@
-%w(base filter builder auto_html_for).each do |f|
- require File.expand_path("../auto_html/#{f}", __FILE__)
-end
+# AutoHtml is a collection of filters that transform plain text into HTML code.
+module AutoHtml
+ autoload :Pipeline, 'auto_html/pipeline'
-Dir["#{File.dirname(__FILE__) + '/auto_html/filters'}/**/*"].each do |filter|
- require "#{filter}"
+ autoload :Emoji, 'auto_html/emoji'
+ autoload :HtmlEscape, 'auto_html/html_escape'
+ autoload :Image, 'auto_html/image'
+ autoload :Link, 'auto_html/link'
+ autoload :Markdown, 'auto_html/markdown'
+ autoload :SimpleFormat, 'auto_html/simple_format'
end
-
-# if rails
-require 'auto_html/railtie' if defined?(Rails::Railtie)
-if defined?(ActiveRecord::Base)
- ActiveRecord::Base.send :include, AutoHtmlFor
-
- module ActionView::Helpers::TextHelper
- include AutoHtml
- end
-end
\ No newline at end of file