jt-partial 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/jt-partial/haml_toolkit.rb +18 -0
- data/lib/jt-partial/partial.rb +1 -1
- data/lib/jt-partial/version.rb +1 -1
- metadata +3 -2
@@ -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
|
data/lib/jt-partial/partial.rb
CHANGED
data/lib/jt-partial/version.rb
CHANGED
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
|
+
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-
|
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:
|