I have gone through the post of capybara + click on alert box but nothing seems to be work. Following is my scenario:
Scenario: When I click update
page.accept_alert
worked for me using Selenium. Other drivers will probably have their own syntax.
As Jillian Foley mentioned, it seems that other answers have been deprecated.