assigning roles and menu items at signup

My problem is similar to the thread from the rails forum:

Creating Two Models in One Form

@user.is_owner_of @menu
This will create Role with @user having @menu,
return true if @user.is_owner_of @menu


you can make:
@user.has_role "menu_owner"
@menu.accept_role "menu_owner"
This will make new role for @user naming "menu_owner" and make @menu
accept ANY user having "menu_owner" permission.
if @user.is_menu_owner_of @menu do {}

This is works well.

Thanks for the suggestion but I am not able to get it to work right.

I am going to try to re-word the original thought:

When someone signs up I would like to save the information they are
sending (params[:user]) and add a relationship to an existing menu (in
a has_and_belongs_to_many situation).

So when user xxx signs up (and becomes id=5) there is an entry in the
menus_users table that is (menu_id 1/user_id 5). This menu (id=1)
already exists.


I wanted to go ahead and post my solution for this thread of

In this scenario the menus table has a column called "kind" and some
of the records are named "default".

  def signup
    @user =[:user])
    return unless!
    self.current_user = @user
    current_user.menus = Menu.find_all_by_kind('default')
    redirect_back_or_default(:controller => '/welcome', :action =>
    flash[:notice] = "Thanks for signing up!"
  rescue ActiveRecord::RecordInvalid
    render :action => 'signup'