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

Version Path
cmor_cms-0.0.60.pre app/template_handlers/action_view/template/handlers/textile.rb
cmor_cms-0.0.59.pre app/template_handlers/action_view/template/handlers/textile.rb
cmor_cms-0.0.58.pre app/template_handlers/action_view/template/handlers/textile.rb
cmor_cms-0.0.57.pre app/template_handlers/action_view/template/handlers/textile.rb
cmor_cms-0.0.56.pre app/template_handlers/action_view/template/handlers/textile.rb
cmor_cms-0.0.55.pre app/template_handlers/action_view/template/handlers/textile.rb
cmor_cms-0.0.54.pre app/template_handlers/action_view/template/handlers/textile.rb
cmor_cms-0.0.53.pre app/template_handlers/action_view/template/handlers/textile.rb
cmor_cms-0.0.52.pre app/template_handlers/action_view/template/handlers/textile.rb
cmor_cms-0.0.51.pre app/template_handlers/action_view/template/handlers/textile.rb
cmor_cms-0.0.50.pre app/template_handlers/action_view/template/handlers/textile.rb
cmor_cms-0.0.49.pre app/template_handlers/action_view/template/handlers/textile.rb
cmor_cms-0.0.48.pre app/template_handlers/action_view/template/handlers/textile.rb
cmor_cms-0.0.45.pre app/template_handlers/action_view/template/handlers/textile.rb
cmor_cms-0.0.44.pre app/template_handlers/action_view/template/handlers/textile.rb
cmor_cms-0.0.43.pre app/template_handlers/action_view/template/handlers/textile.rb
cmor_cms-0.0.42.pre app/template_handlers/action_view/template/handlers/textile.rb
cmor_cms-0.0.41.pre app/template_handlers/action_view/template/handlers/textile.rb
cmor_cms-0.0.40.pre app/template_handlers/action_view/template/handlers/textile.rb
cmor_cms-0.0.39.pre app/template_handlers/action_view/template/handlers/textile.rb