Forum: Ruby on Rails has_many :through association

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Held O. (Guest)
on 2009-01-09 16:44
Hee people,

I have the following problem:

I have the following tables:

      t.string :title

      t.integer :group_id
      t.integer :menu_id
      t.boolean :see
      t.boolean :edit

      t.string :title

when you create a group you should get a list of menu items where you
can select if the persons in the group should be able to edit or see a
particulary item.

Does anybody know how This would be possible (or point me in the right
direction ? ).

Thanxs !
Held O. (Guest)
on 2009-01-09 16:52
To make it a bit more clear:
in my form (for edit and new) I have the following:

<% for menu in Menu.find(:all) %>
    <td><%= check_box_tag "group[menu_ids][]",,
@group.menus.include?(menu) %></td>
     <td><%= menu.title %></td>
<% end %>

But this is not for what i would like ! (if it is even possible :P )
This topic is locked and can not be replied to.