Add put /contacts/:id route. Define update action in contacts_controller.rb file. Add hidden input in form to edit.html.erb file within contacts views and remove autofocus.