Error when using before_action hook to set required relationship attribute - Ash Framework