Use ActiveRecord only if required