dan pastikan ada user_id di tabel profiles

2009/2/11 Leo Laksmana <[email protected]>

>   Concept-nya sama aja koq ama has_many, bedanya di model yang di declare
> belongs_to cuma akan return 1 result pada saat find.
>
> Class User
> Has_one :profile
>
> Class Profile
> Belongs_to :user
>
>
>
> --
> http://beol.laksmana.com/
> http://www.plurk.com/user/beol
>
> Follow my plurk:
> http://plurk.com/redeemByURL?from_uid=787788&check=-300983041&s=1
>
> -----Original Message-----
> From: "doni" <[email protected] <idan_manchester%40yahoo.com>>
>
> Date: Wed, 11 Feb 2009 05:17:52
> To: <[email protected] <id-ruby%40yahoogroups.com>>
> Subject: [id-ruby] Mohooon bantuan nih
>
>
> saya mau menanyakan ma temen2 disni kalo untuk relasi 1 ke 1 itu
> apakah pake has_one di modelnya??
>
> saya belum paham tentang relasi itu ...
>
> misalkan class User (username,password) mau di relasikan ke class
> Profile(nama, alamat, dll)
>
> terima kasih
>
>
>
> ------------------------------------
>
> 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)
>
> http://rubyurl.com/Q8DD
> http://news.gmane.org/gmane.comp.lang.ruby.region.indonesia
>
> Yahoo! Groups Links
>
>
>
>  
>


[Non-text portions of this message have been removed]

Kirim email ke