mirror of
https://github.com/elicpeter/nyx.git
synced 2026-07-06 20:42:10 +02:00
9 lines
328 B
Ruby
9 lines
328 B
Ruby
|
|
# Safe-template-var: render an on-disk template via Rails-style
|
||
|
|
# `render :template, locals: {...}`. The template name is a constant
|
||
|
|
# symbol; the locals carry user input but flow into a file-loaded
|
||
|
|
# template, not into a source string.
|
||
|
|
|
||
|
|
def handler(params)
|
||
|
|
render template: "users/show", locals: { name: params[:name] }
|
||
|
|
end
|