Not quite sure if you need to check if ``result.is_a?(ActiveRecord::Base)``. What's the reasoning behind putting this here?