Foreign key

HI all,

In my application i have 2 tables, 1.logins and 2. credits.

logins contains customer details and credits has credit detils of
customers.

i have given custom foreign key while migrating database for credits
table instead of logins_id i have given as log_id.

how to mention this in model associtations

You'll find lots of "getting started" guides online - no sense
rewriting them here:
http://www.google.co.uk/search?q=getting+started+with+ruby+on+rails

Particularly the guides at http://guides.rubyonrails.org/index.html.
There is one on ActiveRecord Associations which should contain what
you want to know (assuming you have worked through the Getting Started
one first).

Colin