Sha256: a5930b54492836a3bbdbec0ce4fd7e284f7011ba4454ae432e8e06fbc9ca3aee
Contents?: true
Size: 534 Bytes
Versions: 3
Compression:
Stored size: 534 Bytes
Contents
require "html_format/generator" require "html_format/core_ext" require "html_format/version" if defined?(Rails::Engine) require 'html_format/engine' else if defined?(ActiveSupport) ActiveSupport.on_load(:active_record) do include HtmlFormat::ActiveRecord ActiveRecord::Result.class_eval do def to_html(**options) HtmlFormat.generate(collect(&:to_h), options) end end end end if defined?(Mongoid::Document) Mongoid::Document.include(HtmlFormat::ActiveRecord) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
html_format-0.0.9 | lib/html_format.rb |
html_format-0.0.8 | lib/html_format.rb |
html_format-0.0.7 | lib/html_format.rb |