Sha256: 5677766516d2595d9da65297557f94ec99281ffc2e55e32bb50aacf3a15afb4b
Contents?: true
Size: 551 Bytes
Versions: 7
Compression:
Stored size: 551 Bytes
Contents
require 'haml/util' require 'haml/engine' module Ramaze module View module Haml def self.call(action, string) options = action.options if haml_options = action.instance.ancestral_trait[:haml_options] options = options.merge(haml_options) end action.options[:filename] = (action.view || '(haml)') haml = View.compile(string){|s| ::Haml::Engine.new(s, options) } html = haml.to_html(action.instance, action.variables) return html, 'text/html' end end end end
Version data entries
7 entries across 7 versions & 1 rubygems