rbbt-rest 1.2.22 → 1.2.23
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/rbbt/rest/common/render.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NmE0NzYyMmFiODhkNDE4Y2ExZDM4NThhMzk2MjU3YzkzMTM5MjJiMA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
OGNmN2Y5ODk5ZjEwMTRmZDUzZTNiMjViMDY2NzBjMDRlNTIzYTRhYQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
M2IwODM0OTBkZDcyZWEzNDUwOTdjYzA1ZTUwYjVmOTc3MmUwYjU5YWYyZjAw
|
10
|
+
Njg5NWJmYWE1OGQwMzQxZDRiNzRlN2YzYTQ3MDYxNzVjY2UzZmU3NmE4NGUw
|
11
|
+
ODQ4NWVmMDJlYmE2M2EyMTI2NDZlZGI0YTA2NDUxNmYzMDIzYmQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YzE0ODdjYTdlMTg0MmE5YjVjYzE0NTIzYzI1MTA2MmQ2MmRhODUyMTQ3YmY3
|
14
|
+
ZWFjYmYxMzFjZDIyYTYxOWIyNzE0ZDA4ZmZjYzY4MDk4NThkOWE1MzVhMjdi
|
15
|
+
Nzg0MzMzMzM1ZWRiOGVlZmZmNDY2ZTg3NTE2Mjg5OTk4NTYxOTU=
|
@@ -35,6 +35,8 @@ module RbbtRESTHelpers
|
|
35
35
|
def render(template_file, locals = {}, layout_file = nil, cache = nil, cache_options = {})
|
36
36
|
raise TemplateMissing, "Template #{ template_file } not found" unless template_file.exists?
|
37
37
|
raise TemplateMissing, "Template #{ layout_file } not found" unless layout_file.nil? or layout_file.exists?
|
38
|
+
layout_file = layout_file.find if layout_file.respond_to? :find
|
39
|
+
template_file = template_file.find if layout_file.respond_to? :find
|
38
40
|
if layout_file
|
39
41
|
Haml::Engine.new(Open.read(layout_file), :filename => layout_file, :ugly => production?).render(self, locals) do
|
40
42
|
cache(cache, locals.merge(:_template_file => template_file, :user => user).merge(cache_options)) do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbbt-rest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.23
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-11-
|
11
|
+
date: 2013-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|