Hello,
I have a model that contains two fields associated with the same table,
I hooked one up using the standard has_many association but I have no
clue on how to do the second one.
here are my models
class Task < ActiveRecord::Base
belongs_to :user #works fine associating through the user_id field in
the table
belongs_to :user2
#I don’t know what to place here, but I need to associate field
resquester_id to #the users tables too
end
class User < ActiveRecord::Base
has_many :tasks
end
appreciate any help
Coelho