I’m trying to figure some stuff out about using
validates_uniqueness_of, particularly if it is possible to validate a
unique object in a database and rather than throwing an error like
“name already exist”, use the primary key of the already existing
object to pass along to join tables.
So far many of the examples I’ve come across has
validates_uniqueness_of stopping if the object is not unique.
What happens if there is a table of authors joined to a table of
articles, shouldn’t each author in the authors table be unique but
still joined by its id if there is a new article by that author?