Update callbacks.rb

use class_attribute for compatibility