[snippets] add several rails snippets.