activesupport 4.1 doesn't have CallbackChain inherit from Array anymore,
instead, it houses an internal array and delegates to it.
Change-Id: I5730f734be5e7c0422ac56245609043f52b6425a
test-plan: specs
Reviewed-on: https://gerrit.instructure.com/33081
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joel Hough <joel@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
refs CNVS-9522
replace our hokey ActiveRecord::Base.suspend_callbacks implementation
with something that integrates nicely with ActiveSupport::Callbacks in
general, as a gem.
include it into ActiveRecord::Base and use it to implement
save_without_callbacks for rails3 (rails2 still needs to do it the way
we had it before, because the notifications callback isn't handled
through ActiveSupport::Callbacks).
test-plan:
- make sure ActiveRecord callbacks still run in most cases (e.g. after
creating a course through the UI, it should have a value in the uuid
column in the database)
- make sure callbacks don't run while suspended (e.g. have a user
enrolled in two courses. call user.delete_enrollments. both
enrollments should be deleted, but only one delayed job for due date
caching should be created)
Change-Id: Iecd1cc0346e218261677d16ee44bae9cb9149ddd
Reviewed-on: https://gerrit.instructure.com/29809
Reviewed-by: Anthus Williams <awilliams@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>