Sha256: c155cb646821aff469e2af0211cf39b0d9e71b674f8c3d01d023fa5617dab07b

Contents?: true

Size: 390 Bytes

Versions: 14

Compression:

Stored size: 390 Bytes

Contents

require 'haml/util'
require 'haml/engine'

module Ramaze
  module View
    module Haml
      def self.call(action, string)
        action.options[:filename] = (action.view || '(haml)')
        haml = View.compile(string){|s| ::Haml::Engine.new(s, action.options) }
        html = haml.to_html(action.instance, action.variables)

        return html, 'text/html'
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 4 rubygems

Version Path
Pistos-ramaze-2009.06.12 lib/ramaze/view/haml.rb
manveru-ramaze-2009.05.08 lib/ramaze/view/haml.rb
manveru-ramaze-2009.05 lib/ramaze/view/haml.rb
manveru-ramaze-2009.06.04 lib/ramaze/view/haml.rb
manveru-ramaze-2009.06.12 lib/ramaze/view/haml.rb
manveru-ramaze-2009.06 lib/ramaze/view/haml.rb
manveru-ramaze-2009.07 lib/ramaze/view/haml.rb
rjspotter-ramaze-2009.06.29 lib/ramaze/view/haml.rb
rjspotter-ramaze-2009.06.31 lib/ramaze/view/haml.rb
ramaze-2009.07 lib/ramaze/view/haml.rb
ramaze-2009.05 lib/ramaze/view/haml.rb
ramaze-2009.06 lib/ramaze/view/haml.rb
ramaze-2009.06.04 lib/ramaze/view/haml.rb
ramaze-2009.06.12 lib/ramaze/view/haml.rb