Sha256: 43a154b07d4f450b6f2dd55570ceb7bedabdec6499a1c6906cdeb66dbee4afe1
Contents?: true
Size: 707 Bytes
Versions: 18
Compression:
Stored size: 707 Bytes
Contents
require 'redcloth' module Ramaze module Template # Is responsible for compiling a template using the RedCloth templating engine. # Can be found at: http://whytheluckystiff.net/ruby/redcloth/ class RedCloth < Erubis ENGINES[self] = %w[ redcloth ] class << self # Take the action and directly transform it into html by RedCloth def transform(action) restrictions = action.controller.trait[:redcloth_options] || [] rules = action.controller.trait[:redcloth_options] || [] # Erubis -> RedCloth -> HTML redcloth = ::RedCloth.new(super, restrictions) redcloth.to_html(*rules) end end end end end
Version data entries
18 entries across 18 versions & 5 rubygems