search for: blogs_memb

Displaying 1 result from an estimated 1 matches for "blogs_memb".

2006 Feb 07
1
habtm :uniq causing duplicate inserts? How to update Rails?
...tiveRecord::Base has_and_belongs_to_many :blogs, :uniq=>true ..... end class Blog < ActiveRecord::Base has_and_belongs_to_many :members, :uniq=>true ... end The issue is that :uniq=> true isn''t working and multiple records are being inserted in blogs_members table when I call the following in Member class: def self.create_subscription(member, blog) member.blogs.push_with_attributes(blog, :created_at => Time.now) end Also what''s the best way to update rails? I tried using gem update rails but it keeps me at ver...