search for: spankee

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

Did you mean: spanked
2006 Nov 02
4
Still Having Problems With :through When Going To Same Table... Help... please :-(
...s has_many :spanked, :through => :spanks, :source => :spanked_user has_many :was_spanked_by, :through => :spanks, :source => :user end class Spank < ActiveRecord::Base belongs_to :spanker, :class_name => "User", :foreign_key => "user_id" belongs_to :spankee, :class_name => "User", :foreign_key => "spanked_user_id" end db_table:spanks id | user_id | spanked_user_id | created_at | updated_at >>>>> I want to be able to make statemets like: john = User.find_by_nickname("john") john.spanked john.was_sp...