copying a rails cast