Some help please!! class Article < ActiveRecord::Base has_and_belongs_to_many :tags, :join_table => :articles_tags_users has_and_belongs_to_many :users, :join_table => :articles_tags_users end
class Tag < ActiveRecord::Base has_and_belongs_to_many :articles, :join_table => :articles_tags_users has_and_belongs_to_many :users, :join_table => :articles_tags_users end class User < ActiveRecord::Base has_and_belongs_to_many :articles, :join_table => :articles_tags_users has_and_belongs_to_many :tags, :join_table => :articles_tags_users end then in the controller user = User.new tag = Tag.find(id) article = Article.find(id) user.tag << tag user.article << article all this creates 2 tuples on the database articles_tags_users instead of one with all the values Do somebody knows how to do this? Thanks ! -- Felipe Vergara Contesse IngenierĂa Civil Industrial UC --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" 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/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

