DRY for render functions, using Padrino 0.12
Adopt csrf setting to padrino 0.12
Replace PADRINO_ENV through RACK_ENV