flame 4.0.1 → 4.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/flame/render.rb +3 -1
- 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: 1b52db07498e5214218b077fda90572503d291ec
|
4
|
+
data.tar.gz: 620633b76a15556a9dc8599df3bde0d89f468d2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de46b73a9358939c8fad6a036ded3fb718477d2987ac6c568a0701f5785fb1cd1ed073fe922de1c8e3d95c9d1ce08c9223e99fc52bf206f373260408f7056dea
|
7
|
+
data.tar.gz: 7065e69a6a6cf85772faffe5db31a81f34828819b09100c8579973b5ef0c42cf1b363eb2e5f76334b73bbfeb25a08d0e47026536f424b519a2af8c95b357e1f0
|
data/lib/flame/render.rb
CHANGED
@@ -16,7 +16,8 @@ module Flame
|
|
16
16
|
@locals = options.merge(options.delete(:locals) || {})
|
17
17
|
## Find filename
|
18
18
|
@filename = find_file(path)
|
19
|
-
@ctrl.instance_exec { halt 404 } unless @filename
|
19
|
+
# @ctrl.instance_exec { halt 404 } unless @filename
|
20
|
+
return unless @filename
|
20
21
|
@layout = nil if File.basename(@filename)[0] == '_'
|
21
22
|
end
|
22
23
|
|
@@ -24,6 +25,7 @@ module Flame
|
|
24
25
|
## @param cache [Boolean] cache compiles or not
|
25
26
|
def render(cache: true)
|
26
27
|
## Compile Tilt to instance hash
|
28
|
+
return unless @filename
|
27
29
|
tilt = cache ? self.class.tilts[@filename] ||= compile : compile
|
28
30
|
## Render Tilt from instance hash with new options
|
29
31
|
layout_render tilt.render(@scope, @locals), cache: cache
|