Hi All,
I’ve recently starting programming in RoR. Here’s a question re: the
ActiveRecord validation methods. Are they transaction safe?
It seems that saving an instance of a model with validation methods
could require multiple db queries. For example,
validated_uniqueness_of would need to do at least one query to figure
out if the value already exists and then the second query to insert a
new record.
Are these queries contained in a single transaction? If not, how do
you make sure that they are part of the same transaction?
Thanks for your help!