Adds deselect logic to ActiveRecord