Which is the better way to indicating synonyms into a table? But I’d
get all those synonyms together to the main table. Althought if is
choosed a synonym I’d that it were directed to the object of the main
table.
I don’t know if a polymorphic association could be helpful in this
case. Any help please?
create_table :words do |t|
t.string :name
t.string :synonym # All synonyms of that word, if any (separated by
‘/’)
end
or
create_table :words do |t|
t.string :name
has_many :synonyms
end
create_table :synonyms do |t|
t.string :name