Sha256: d764c04074084c64588b01bd45635de0c6da990883fbeb66a55514846492a7f4
Contents?: true
Size: 662 Bytes
Versions: 20
Compression:
Stored size: 662 Bytes
Contents
module ActionView::Template::Handlers class Textile class_attribute :default_format self.default_format = Mime[:html] def erb_handler @@erb_handler ||= ActionView::Template.registered_template_handler(:erb) end if Rails.version < '6.0.0.beta1' && Rails.version < '6.0.0' def call(template) compiled_source = erb_handler.call(template) "RedCloth.new(begin;#{compiled_source};end).to_html.html_safe" end else def call(template, source) compiled_source = erb_handler.call(template, source) "RedCloth.new(begin;#{compiled_source};end).to_html.html_safe" end end end end
Version data entries
20 entries across 20 versions & 1 rubygems