Support disabled ActiveRecord

In case of not using ActiveRecord it should still work