Message from discussion
help for ideas of instance method or controller
Received: by 10.14.216.7 with SMTP id f7mr17049534eep.4.1352628634604;
Sun, 11 Nov 2012 02:10:34 -0800 (PST)
X-BeenThere: rubyonrails-talk@googlegroups.com
Received: by 10.14.221.73 with SMTP id q49ls3664728eep.7.gmail; Sun, 11 Nov
2012 02:09:10 -0800 (PST)
Received: by 10.14.215.136 with SMTP id e8mr17040421eep.6.1352628550090;
Sun, 11 Nov 2012 02:09:10 -0800 (PST)
Received: by 10.14.215.136 with SMTP id e8mr17040420eep.6.1352628550080;
Sun, 11 Nov 2012 02:09:10 -0800 (PST)
Return-Path: <li...@ruby-forum.com>
Received: from eq4.andreas-s.net (eq4.andreas-s.net. [188.40.52.210])
by gmr-mx.google.com with ESMTPS id u8si919683een.1.2012.11.11.02.09.10
(version=TLSv1/SSLv3 cipher=AES128-SHA);
Sun, 11 Nov 2012 02:09:10 -0800 (PST)
Received-SPF: pass (google.com: domain of li...@ruby-forum.com designates 188.40.52.210 as permitted sender) client-ip=188.40.52.210;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of li...@ruby-forum.com designates 188.40.52.210 as permitted sender) smtp.mail=li...@ruby-forum.com
Received: from localhost (localhost [127.0.0.1])
(uid 1004)
by eq4.andreas-s.net with local; Sun, 11 Nov 2012 11:09:09 +0100
id 00000000005D4008.00000000509F7945.000028CF
Old-Return-Path: <li...@ruby-forum.com>
Date: Sun, 11 Nov 2012 11:09:09 +0100
From: Soichi Ishida <li...@ruby-forum.com>
Reply-To: rubyonrails-talk@googlegroups.com
To: rubyonrails-talk@googlegroups.com
Message-ID: <29ffe1d74166720f698ee5e72e0fe454@ruby-forum.com>
In-Reply-To: <CAL=0gLt7sCjXSAfVqoX9=dgJOnotASowvyWuLWQyFWhJ9EMZPA@mail.gmail.com>
References: <0f55a4d2ca9d7cc93ebf82092582f3a9@ruby-forum.com> <CAL=0gLtUsGBc0PsUrzn5=FoGjKZMF-S0vTMNtc7+CD3Ka13hbA@mail.gmail.com> <2b68ffd9dfb130ad660c16104ae2639a@ruby-forum.com> <CAL=0gLt7sCjXSAfVqoX9=dgJOnotASowvyWuLWQyFWhJ9EMZPA@mail.gmail.com>
Subject: Re: Re: help for ideas of instance method or controller
Mime-Version: 1.0
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: 7bit
Errors-to: li...@ruby-forum.com
> Note that you can have multiple associations into the same table using
> and :class_name option. So for example
> class Something
> belongs_to :give, :foreign_key => "give_id", :classname => "Widget"
> belongs_to :take, :foreign_key => "take_id", :classname => "Widget"
>
> Have a look at the Rails Guide on ActiveRecord Associations for more
> information.
Thanks. I always wonder why I do things more complicated than
necessary... ;)
soichi
--
Posted via http://www.ruby-forum.com/.