rack-app-front_end 0.15.0 → 0.15.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/rack/app/front_end/template.rb +2 -10
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 25f1b5ba45bcda159720f34bc1baf80a28b7944c
|
4
|
+
data.tar.gz: 12959459fdedbac0ecf89ebd002156d2661fec11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 503153690722a962f33bf4b9bc48ead6d99d15621516315a6fb864c7e5c153241aea47a32631b04b138c6de4158bc724654f01e37d7d07e5661640b5f2172ea4
|
7
|
+
data.tar.gz: 533a6f13055e7f7db5fc0225f3087f4a521991b1afd0e90f39561d6d0eefec3363f956a9d09ce9ad69c9d366015533a4c77920905d17769c50567ff379917478
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.15.
|
1
|
+
0.15.1
|
@@ -13,12 +13,11 @@ class Rack::App::FrontEnd::Template
|
|
13
13
|
not Tilt.templates_for(file_path).empty?
|
14
14
|
end
|
15
15
|
|
16
|
-
def render(
|
17
|
-
scope = create_scope(current_scope)
|
18
|
-
|
16
|
+
def render(scope, variables={}, &block)
|
19
17
|
layout.render(scope, variables) { template.render(scope, variables, &block) }
|
20
18
|
end
|
21
19
|
|
20
|
+
|
22
21
|
protected
|
23
22
|
|
24
23
|
DEFAULT_TEMPLATE_OPTIONS = {:default_encoding => "utf-8"}
|
@@ -53,11 +52,4 @@ class Rack::App::FrontEnd::Template
|
|
53
52
|
self.class.cache.fetch(file_path) { Tilt.new(file_path, @template_options) }
|
54
53
|
end
|
55
54
|
|
56
|
-
def create_scope(current_scope)
|
57
|
-
new_scope = Scope.new
|
58
|
-
new_scope.inherit_instance_variables!(current_scope)
|
59
|
-
new_scope.inherit_modules!(current_scope)
|
60
|
-
new_scope
|
61
|
-
end
|
62
|
-
|
63
55
|
end
|