Rails conditional validation in model
问题 I have a Rails 3.2.18 app where I'm trying to do some conditional validation on a model. In the call model there are two fields :location_id (which is an association to a list of pre-defined locations) and :location_other (which is a text field where someone could type in a string or in this case an address). What I want to be able to do is use validations when creating a call to where either the :location_id or :location_other is validated to be present. I've read through the Rails