sunspot/sunspot — pull request #244 by vanstee (2012-06-14 23:39:48+00:00)
Title: Switch to after_commit

Since indexing call backs were fired off on `after_save` and `after_destory` events we were seeing `RecordNotFound` exceptions periodically. This just switches those callbacks to use `after_commit`.

I had to install `database_cleaner` and tag those specific specs as well to make sure the callbacks were fired. There wasn't really a noticeable difference in speed, but let me know if we should try another approach.