Sha256: 90019d858f7cd3e2ab5bef0041308660cb70b75be6136468267b693c92c116fd

Contents?: true

Size: 517 Bytes

Versions: 2

Compression:

Stored size: 517 Bytes

Contents

<?xml version="1.0"?>

<html>

<?r 
	# the code that populates the template comes here

	unless name = request["name"]
		name = "World"
	end
	
	# maintain a session variable
	
	session = request.session 
	session[:counter] = 0 unless session[:counter]
	session[:counter] += 1
?>

<!-- the template comes here -->

<h1>Hello #{name}</h1>

<p>
<form id="my_form">
	<b>Enter your name:</b>
	<input type="text" name="name" />
	<br />
	<input type="submit" />
</form>
</p>
<p>
	Counter: #{session[:counter]}
</p>

</html>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
nitro-0.2.0 examples/tiny/root/index.sx
nitro-0.3.0 examples/tiny/root/index.sx