rails3 snippet