If debug can't be used for checking relationship, how can I check whether the 
relationship is already up and running? I have tried to_yaml and inspect, but 
to_yaml (simple_format @users.to_yaml) returns the same thing as debug, 
@users.inspect returns #

I have tried to access the attribute of the def-something model directly in the 
controller, but it gave me an error stated that the object does not that 
attributes. From what i understand from this, my relationship setup is still 
failed. I also have tried to change the involved objects to something like 
def_jabatan, defjabatan, etc in all of the model files, but it still does not 
work.


regards,
Arga


----- Original Message ----
From: Tim Shaffer <timshaf...@me.com>
To: Ruby on Rails: Talk <rubyonrails-talk@googlegroups.com>
Sent: Tuesday, November 16, 2010 20:13:39
Subject: [Rails] Re: Why is my models can't be related using has_one and 
belongs_to?

On Nov 16, 7:17 am, arga aridarma <arga_arida...@yahoo.com> wrote:
> I'm getting a feeling that I didn't set the relationship right, because i 
don't
> see any attributes addition in the ComUser from the model started with
> Def-something that i create above..

Forgot to add that changing the case on the association won't fix
this.

Using the debug helper simply calls to_yaml on the model, which won't
show any of the associations. It simply shows the foreign keys:
def_jabatan_id, def_kelamin_id, etc.

-- 
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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.


-- 
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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to