move from Ruby to Rails