Module: Ramaze::View::Haml
- Defined in:
- lib/ramaze/view/haml.rb
Overview
View adapter that allows views to use Haml, for more information see the following website: haml-lang.com/
Class Method Summary collapse
Class Method Details
.call(action, string) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/ramaze/view/haml.rb', line 12 def self.call(action, string) = action. if = action.instance.ancestral_trait[:haml_options] = .merge() end action.[:filename] = (action.view || '(haml)') haml = View.compile(string){|s| ::Haml::Engine.new(s, ) } html = haml.to_html(action.instance, action.variables) return html, 'text/html' end |