Sha256: 3c9dd057fb84637cc64c6f75b8cbd4114eb647319959c84aeef2ed70672608db

Contents?: true

Size: 635 Bytes

Versions: 30

Compression:

Stored size: 635 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'
      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

30 entries across 30 versions & 1 rubygems

Version Path
cmor_cms-0.0.38.pre app/template_handlers/action_view/template/handlers/textile.rb
cmor_cms-0.0.37.pre app/template_handlers/action_view/template/handlers/textile.rb
cmor_cms-0.0.36.pre app/template_handlers/action_view/template/handlers/textile.rb
cmor_cms-0.0.35.pre app/template_handlers/action_view/template/handlers/textile.rb
cmor_cms-0.0.34.pre app/template_handlers/action_view/template/handlers/textile.rb
cmor_cms-0.0.33.pre app/template_handlers/action_view/template/handlers/textile.rb
cmor_cms-0.0.32.pre app/template_handlers/action_view/template/handlers/textile.rb
cmor_cms-0.0.31.pre app/template_handlers/action_view/template/handlers/textile.rb
cmor_cms-0.0.30.pre app/template_handlers/action_view/template/handlers/textile.rb
cmor_cms-0.0.29.pre app/template_handlers/action_view/template/handlers/textile.rb
cmor_cms-0.0.28.pre app/template_handlers/action_view/template/handlers/textile.rb
cmor_cms-0.0.27.pre app/template_handlers/action_view/template/handlers/textile.rb
cmor_cms-0.0.26.pre app/template_handlers/action_view/template/handlers/textile.rb
cmor_cms-0.0.25.pre app/template_handlers/action_view/template/handlers/textile.rb
cmor_cms-0.0.24.pre app/template_handlers/action_view/template/handlers/textile.rb
cmor_cms-0.0.22.pre app/template_handlers/action_view/template/handlers/textile.rb
cmor_cms-0.0.21.pre app/template_handlers/action_view/template/handlers/textile.rb
cmor_cms-0.0.20.pre app/template_handlers/action_view/template/handlers/textile.rb
cmor_cms-0.0.19.pre app/template_handlers/action_view/template/handlers/textile.rb
cmor_cms-0.0.18.pre app/template_handlers/action_view/template/handlers/textile.rb