mungkin nested attributes yang dimaksud?
http://ryandaigle.com/articles/2009/2/1/what-s-new-in-edge-rails-nested-attributes
--Gozali
On Jan 20, 2010, at 11:48 PM, my wrote:
> Salam rekan-rekan.
>
> saya punya kasus sederhana.
> misalkan saya membuat aplikasi tracking file
>
> file has_many :version.
>
> masalahnya ingin membatasi bahwa version tidak bisa di create tanpa
> terlebih dahulu ada bila yang berkorespondensi.
> atau version.file_id tidak boleh null atau jika ada, id nya harus
> ada di database terlebih dahulu.
>
> bagaimana melakukan hal ini ?
>
> sebenarnya terifikir memasukan fungsi pengecekan di before_create
> dan before_update. namun adakah cara yang lebih baik ?
>
> terimakasih sebelumnya
>
>
>
[Non-text portions of this message have been removed]
------------------------------------
ID-Ruby
Berdiskusi dan belajar bersama Bahasa Pemrograman Ruby, termasuk segala varian
Ruby (JRuby, Rubinius, IronRuby, XRuby), dan program yang dibuat dengan Ruby
(Ruby on Rails, JRuby on Rails, Merb)
<*> Follow Ruby Indonesia on Twitter
http://twitter.com/rubyindonesia
<*> Kunjungi Situs Resmi Ruby Indonesia
http://www.ruby-lang.org/id/
<*> Join Ruby Indonesia on Facebook
http://rubyurl.com/QV48
<*> Join Ruby Indonesia on LinkedIn
http://rubyurl.com/eh0i
<*> Kunjungi *arsip milis* id-ruby di
http://groups.yahoo.com/group/id-ruby/messages
http://www.mail-archive.com/[email protected]/
http://rubyurl.com/Q8DD
http://news.gmane.org/gmane.comp.lang.ruby.region.indonesia
<*> Baca peraturan id-ruby sebelum posting
http://rubyurl.com/gay1
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/id-ruby/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/id-ruby/join
(Yahoo! ID required)
<*> To change settings via email:
[email protected]
[email protected]
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/