Hi, I am new to Rails. I am trying to stablish many to many relationship between "Books" and "Categories".
Following are the Models. ------- class Book < ActiveRecord::Base has_many :book_categories has_many :categories, :through => :book_categories end ------- class Category < ActiveRecord::Base has_many :book_categories has_many :books, :through => :book_categories end ------- class BookCategories < ActiveRecord::Base belongs_to :category belongs_to :book end ------- Now when i am trying to get list of categories to whom a book belongs or list of books that belongs to a category from the heroku console it generates error. Following is a sample run. ------ Rails Console for urlib >> a = Category.find 1 #<Category id: 1, area: "Science", name: "Computer"> >> a.books ArgumentError: A copy of Category has been removed from the module tree but is still active! >> ------ I tried it in several ways but the error "ArgumentError: A copy of Category has been removed from the module tree but is still active!" is always there. Any help? Thanks! -- ibnesayeed --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Heroku" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/heroku?hl=en -~----------~----~----~----~------~----~------~--~---
