Foreign_key problems

model user
id (automatic primary)
fname
lname
user_rrid (foreign key) - string “123456”

model email
id (automatic primary)
e_addresss
user_rrid (foreign key) - string “123456”
e_type

i would like to find a user by fname
@user = User.find_by_fname(“John”)
then use…
@user.email.e_address
@user.email.e_type

i would also like to go the other way. search email based on e_address
and find the user.

can you please show how the user.rb and email.rb files should be set
up. i have looked thru the docs and googled and everything i try does
not work.
i have tried using foreign_key but it does not work.
thanks.