Thanks again for your time. But not what I meant, in that in your
example post is a child of categories. What I a m trying to figure out
how to do (and not sure if it's possible) would be to do this from the
parent side to select a child. For example using your example above
something like
(in the category form)
collection_select "category", "post_ids", @posts, :id, :name,
:multiple => true
The use for something like this would be if for example I wished to
create a new category and on the same page assign some previously
existing posts to it.
The problem with this is that the category model presumable would not
contain a post_id (foreign key) but rather post would contain a
category_id because post belongs_to categories. That's why I question
if this is possible in a one to many relationship, or if this would
require it to be many to many so that there would be a post_ids on the
join table that could be referenced from the category table.
thanks for your time.
On May 20, 7:45 pm, Carlos Antonio da Silva