lib/jt-partial/haml_toolkit.rb in jt-partial-0.0.5 vs lib/jt-partial/haml_toolkit.rb in jt-partial-0.0.6

- old
+ new

@@ -1,23 +1,12 @@ -require "haml" -require 'action_pack' -require 'action_controller' -require 'action_view' - -require 'rails' - -require "haml/helpers/action_view_mods" - -require 'haml/template' - #haml toolkit def haml_render(template_path, args = {}) Haml::Engine.new(File.read(template_path)).render Object.new, args end -def container name, path, &block - #puts path - base = ActionView::Base::new(path) - base.render :layout => name, &block +def container template_path, args, &block + Haml::Engine.new(File.read(template_path)).render Object.new, args do + capture_haml( &block ) + end end