Article View: pl.comp.lang.ruby
Article #1193Re: ActiveRecord + drzewo
From: Radosław Bułat
Date: Mon, 16 Feb 2009 22:23
Date: Mon, 16 Feb 2009 22:23
14 lines
1390 bytes
1390 bytes
zbyszek.malec@gmail.com pisze: > category = Category.new :name => 'cat' > subcategory = category.subcategories.build :name => 'subcat' > > nie ustawia parent_category_id u podkategorii na ich rodzica. Czy da > się to osiągnąć deklaratywnie, > czy jestem zmuszony do ręcznej obsługi tej sytuacji? Czy robisz w ogóle .save? Bo po zapisie powinny być ustawione poprawnie idki (ew. potrzebny jest reload obiektów). -- Radosław Bułat http://radarek.jogger.pl - mój blog
Technical Details
Message-ID:
<gncp0d$otn$2@inews.gazeta.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mailReferences:
<6c73d4b9-ccf5-44be-a258-5cc7b94f6ced@j1g2000yqi.googlegroups.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail From: Radosław Bułat <radarrek@poczta.fm> Newsgroups: pl.comp.lang.ruby Subject: Re: ActiveRecord + drzewo Date: Mon, 16 Feb 2009 23:23:08 +0100 Organization: "Portal Gazeta.pl -> http://www.gazeta.pl" Lines: 14 Message-ID: <gncp0d$otn$2@inews.gazeta.pl> References: <6c73d4b9-ccf5-44be-a258-5cc7b94f6ced@j1g2000yqi.googlegroups.com> NNTP-Posting-Host: chello089074175199.chello.pl Mime-Version: 1.0 X-Trace: inews.gazeta.pl 1234822989 25527 89.74.175.199 (16 Feb 2009 22:23:09 GMT) X-Complaints-To: usenet@agora.pl NNTP-Posting-Date: Mon, 16 Feb 2009 22:23:09 +0000 (UTC) X-User: radek.bulat In-Reply-To: <6c73d4b9-ccf5-44be-a258-5cc7b94f6ced@j1g2000yqi.googlegroups.com> User-Agent: Thunderbird 2.0.0.19 (X11/20090105) Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit