sunspot/sunspot — pull request #249 by alindeman (2012-06-19 16:18:26+00:00)
Title: Auto index and auto remove callbacks can be configured

Auto index and auto remove by default use `after_save` and `after_destroy`. These are problematic if something like `sunspot-queue` is used, or if an `after_*` callback aborts the transaction.

These configuration options (and new defaults) use `after_commit` which fires after the transaction has finished. This option is only available in Rails 3.

`auto_index_callback` and `auto_remove_callback` are set in `config/sunspot.yml`

/cc: @vanstee, @jmileham