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 -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 8 July 2010 08:41, Rajkumar Surabhi <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> In my application i have 2 tables, 1.logins and 2. credits. > > how to mention this in model associtationsYou''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 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 8 July 2010 08:52, Michael Pavling <pavling-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 8 July 2010 08:41, Rajkumar Surabhi <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >> In my application i have 2 tables, 1.logins and 2. credits. >> >> 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+railsParticularly 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 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.