Switched to ActiveRecord library.