We cannot trust the values sent in the action variable because of two reasons:
i. The :on validation helper in the validates_presence_of doesn't accept the array. It accepts either :create or :update value.
ii. The second reason for not trusting the values is that the validates_presence_of cannot be run on :destroy. 

This method is written with an aim to filter out the destroy option and then finding out whether the passed actions have :create, :update or both values. Depending on it we would set the expectation for the validation...