azavea/nyc-trees — pull request #162 by jwalgran (2014-12-19 02:02:20+00:00)
Title: RSVP from event detail page

This PR activates the RSVP button on the event detail page.

I extracted the RSVP markup into a partial so it can be rendered and returned as the response from the register and unregister views.

The workflow for making an AJAX request and replacing content with the response was not specific to event registration, so I implemented a reusable fetchAndReplace function.

There are several different behaviors triggered by different states of the database and logged in user, so I will add some integration tests before merging.