Let me explain
I have these models
class User < AR::Base
class Contact < AR::Base
belongs_to :user_contact_id, :class_name => “User”, :foreign_key =>
“user_contact_id” # I have field called :user_contact_id who is the
another user record of the user table.
# CHECK IF THE USER ALREADY HAVE A CONTACT WITH THE USER_CONTACT_ID
I’ve an instantiated User class, @user, and want to do the following
@user.contacts.is_contact?(user_contact_id) # This works like a charm.
My question is, how can i access the @user caller object from the
self.is_contact? method in Contact Class? Is this possible?