Corrected regex return sign (1$ => $1)
modified:   app/models/todo.rb
Modified controller logic to move it in the model
app/controllers/todos_controller.rb
app/models/todo.rb
Corrected form view to use it with the edit method as well
modified:   app/views/todos/_form.html.erb