This may not be rails unique but what is the best practice to validate
the uniqueness of has_many associations.
In particular the models are
acts_as_list :scope => :dictionary_entry
has_many :words, :through => :phrase_components
Dictionary entries (words and phrases) are composed of words (which
and I want to check the same phrase occurs only once in the
Is there a better or more efficient way to do this than create and
update a footprint
of the word associations on dictionary entries?
This means I would have a string field in the dictionary_entries table
which is a concatenation of
the associated words and would check the uniquness of that.
If we generalize the problem, we need to assure uniqueness of lists of
arbitrary objects (where a list is via a join table), in that case the
only representation that I can create on the list is the concatenation
of ids of list items and check the uniqueness of this?
I begin to think there must be a more canonical way to handle this.
Any help appreciated
I found someone asking the same question but no reply followed.