sinatra-thymeleaf 0.0.7 → 0.0.8
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.
- checksums.yaml +4 -4
- data/README.md +6 -0
- data/lib/sinatra/thymeleaf.rb +1 -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: a3558b4ae1dfd623d63e1be2ff957d3805ae706b
|
4
|
+
data.tar.gz: 5da78c864dc592d97f5def95f62e34aad73f6570
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c444262ad78982589045ec30c4e727c1ac9f7083995676e6c2898e437cdf5cf5d24a06d3709b8eef4ff37b371d9344adde6fb12acc42cba26e4e4e601551fe3e
|
7
|
+
data.tar.gz: 391af7490d53481f3686886fc0b66e46a75f5ddb4ef2f022259353931cc3e56e02c6ae54bc337ca331387e1b77d4e79b60107bf7878168617862d437b386dd0c
|
data/README.md
CHANGED
@@ -38,3 +38,9 @@ That's about it.
|
|
38
38
|
|
39
39
|
I'll continue to add functionality and details, as I'm looking to use this in a project.
|
40
40
|
Please add issues if you spot any problems.
|
41
|
+
|
42
|
+
# Template parameters
|
43
|
+
The template variables can be passed by using the locals parameter, like this:
|
44
|
+
```
|
45
|
+
thyme :test, {:param => 'value'>}
|
46
|
+
```
|
data/lib/sinatra/thymeleaf.rb
CHANGED
@@ -4,7 +4,7 @@ require_relative 'tilt/thymeleaf'
|
|
4
4
|
module Sinatra
|
5
5
|
|
6
6
|
module Thymeleaf
|
7
|
-
def thyme(template=nil,
|
7
|
+
def thyme(template=nil, locals={}, options = {}, &block)
|
8
8
|
options, template = template, nil if template.is_a?(Hash)
|
9
9
|
template = lambda { block } if template.nil?
|
10
10
|
render :html, template, options, locals
|