I have three tables (article, colorsets, colors). colors just defines different color-values, colorsets ist used to define a set of colors an article may have. colors an colorsets have an 1:n relation
colors
1 blue
2 red
3 green
4 yellow
…
colorsets
a 1
a 2
a 4
b 2
b 3
…
article
ball b
car a
…
This means that article ‘ball’ may have colors ‘red, green’ and car may have ‘blue, red, yellow’.
Now my question. I like to have a grid view which shows the articles with all possible colors and not only the colorset-id.
ball red,green
car blue, red, yellow
Also in a form to edit one article I want to have a dropdownbox for the colorsets, where the colors are displayed and not only the colorset id.
I think my problem is to get values from an ActiveRecords into one string variable.
Sorry for my late response - I had to take an unplanned trip.
Many thanks for your tip laqrhead!. This pointed me in the right direction to solve my problem. As a newbie, sometimes I don’t see how simple things can be