Tip from Vagabond:
Written Wednesday, April 12, 2006

Set your session storage type

With things like FastCGI where 5 instances of nitro are spawned, memory sessions (the default) just don't work. (If you don't need 5 instances, try setting the min and max spawns to 1. Otherwise read o

Tip from Rayman:
Written Wednesday, April 12, 2006

is it GET or POST?

request.post? (available in context) return true if the request method is POST. :)

Tip from Vagabond:
Written Wednesday, April 5, 2006

Passing arguments to Elements

Want a little dynamism in your elements? You can pass stuff to the element in the element's tag:

Some Content

Now, to make

Tip from Vagabond:
Written Wednesday, April 5, 2006

Recompiling template elements without a restart

Fed up of ctrl-Cing webrick everytime you edit a Element template? Well, no more!

Simply define a controller method to do it for you:

def recompile Nitro::Element.compile

Tip from bsoto:
Written Wednesday, March 29, 2006

Debug dump to web browser

Like to see an object in an easy to read format?

Add #{debug variable} to your view for a YAML dump of an object.

Tip from pihentagy:
Written Monday, March 27, 2006

Speeding up nitro

Is your nitro app slow?

Set it than to production mode!

Add the following line before starting nitro into your run.rb:

Nitro::Runner.mode = :live

Also run it an other webserver than webrick

first