search for: remove_reverse_association

Displaying 3 results from an estimated 3 matches for "remove_reverse_association".

2006 Feb 21
7
Self-referencial habtm relationship
Heyo! I am setting up a self-referencial habtm relationship with the users of my app. I am using Chad Fowler''s "Rails Recipes" to get me started, and everything works great with the join table "people_friends". I add friends by doing somebody.friends << somebodyelse. However, with my app, there is an approval process so my join table has columns person_id,
2006 Jan 09
6
has_and_belongs_to_many :self
Hi all I got the following class: class Member < ActiveRecord::Base has_and_belongs_to_many :buddies, :class_name => ''Member'', :join_table => ''members_have_buddies'', :foreign_key => ''member_id'', :association_foreign_key =>
2006 Feb 27
4
2 belongs_to to the same parent table
Hello! I have 2 table: users and buddies User: id, name, ... Buddy: id, user_id, user_buddy_id, ... So if you have 2 users 1,jack and 2,fred and fred is a buddy of jack, there is a Buddy object: id=1, user_id=1, user_buddy_id=2 I can declare only one belongs_to in Buddy and one has_many in User. And there is conflict if I had the second one (the first one is discarded) class User has_many