I have two models Post
and PostCategory
both of which have has_and_belongs_to_many
relationships.
I have created manually three post_categories
: news
, don't miss
and announcements
.
When i create a new post
i want to be able to choose in which categories
it belongs to
via a select
with multiple="true"
.
Attention: I don't want to create a new category
on post
creation but to attach one or more categories
to this post
!