Refactored activate method to use AR query syntax