lib/adhearsion/initializer/rails.rb in eric-adhearsion-0.7.999 vs lib/adhearsion/initializer/rails.rb in eric-adhearsion-0.8.0

- old
+ new

@@ -16,10 +16,10 @@ raise "Error loading Rails environment in #{rails_root.inspect}. " + "It's not a directory!" unless File.directory?(rails_root) load_rails if defined? ActiveRecord ActiveRecord::Base.allow_concurrency = true - Hooks::BeforeCall.create_hook do + Events.register_callback([:asterisk, :before_call]) do ActiveRecord::Base.verify_active_connections! end end end