templating: functions railslike