Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6121309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:46:09+00:00 2026-05-23T15:46:09+00:00

Could not find table ‘groups_users’ <% for group in @groups %> <%= check_box_tag user[group_ids][],

  • 0

Could not find table ‘groups_users’

<% for group in @groups %>
  <%= check_box_tag "user[group_ids][]", group.id, @user.groups.include?(group) %>
  <%= group.description %>
<% end %>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T15:46:10+00:00Added an answer on May 23, 2026 at 3:46 pm

    When using a habtm relationship, you need to create the join table. This is a simple table which stores the relationship by referring to each table via foreign key.

    rails g migration create_groups_users_table
    
    class CreateGroupUsersTable < ActiveRecord::Migration
      def change
        create_table :groups_users, :id => false do |t|
          t.integer :group_id
          t.integer :user_id
        end
      end
    end
    
    rake db:migrate
    

    Note that the above is for rails 3.1, as it uses the change method. Change to down and up respectively when using rails 3 or lower.

    After running the migration, it should work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I searched a lot but could not find a way to dump table relations
I could not find an XNOR operator to provide this truth table: a b
I could not find any pointers on how to create a menubar icon on
I could not find the function that returns the name of the cell referenced.
I could not find a clear answer to this question elsewhere, so I'll try
After having a search around I could not find exactly what I want, I
I have research about an issue and could not find a solution for it
I have been searching everywhere but I could not find an answer. I need
I searched the Web and could not find anything that would show me a
I'm getting the build error 'error VCBLD0007: Could not find project configuration RELEASE|X64 to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.