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
You can click on an alert box like this:
page.driver.browser.switch_to.alert.accept