Move if statement in homes_controller before_action to private method