jt-partial 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,23 @@
1
1
  require "haml"
2
+ require 'action_pack'
3
+ require 'action_controller'
4
+ require 'action_view'
5
+
6
+ require 'rails'
7
+
8
+ require "haml/helpers/action_view_mods"
9
+
10
+ require 'haml/template'
11
+
2
12
  #haml toolkit
13
+
3
14
  def haml_render(template_path, args = {})
4
15
  Haml::Engine.new(File.read(template_path)).render Object.new, args
5
16
  end
17
+
18
+
19
+ def container name, path, &block
20
+ #puts path
21
+ base = ActionView::Base::new(path)
22
+ base.render :layout => name, &block
23
+ end
@@ -1,5 +1,5 @@
1
1
  #partial
2
- def render(partial)
2
+ def partial(partial)
3
3
  partial_path = "_#{partial}.haml"
4
4
  haml_render(partial_path)
5
5
  end
@@ -1,5 +1,5 @@
1
1
  module Jt
2
2
  module Partial
3
- VERSION = "0.0.4"
3
+ VERSION = "0.0.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jt-partial
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-28 00:00:00.000000000 Z
12
+ date: 2012-11-30 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: generate one page application html
15
15
  email:
@@ -56,3 +56,4 @@ signing_key:
56
56
  specification_version: 3
57
57
  summary: partial for haml
58
58
  test_files: []
59
+ has_rdoc: