search for: members_have_buddi

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

Did you mean: members_have_buddies
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 => ''buddy_id'' end You can see that a member can have any other member as a "buddy"; these relationships are held in the table...
2006 Jan 12
0
HABTM with conditional field in relation table
...in my application, and every member can assign other members as buddies. class Member < ActiveRecord::Base # Hat folgende Buddies has_and_belongs_to_many :buddies, :class_name => ''Member'', :join_table => ''members_have_buddies'', :association_foreign_key => ''buddy_id'', :order => ''username'' # Ist Buddy von has_and_belongs_to_many :buddy_of, :class_name => ''Member'',...
2006 Jan 11
4
Member.buddies.sort >> undefined method `<=>''
Hi all I have a model Member that has a habtm relationship to buddies (also members). Now I wanted to sort them using sort, but this ends in an error "undefined method <=>"! Where''s the problem here? Sorry, I''m still beginning to learn Ruby. ;-) Thanks Josh -- Posted via http://www.ruby-forum.com/.