Re: [Rails] Re: Why is my models can't be related using has_one and belongs_to?
Hello Tim,
I have done that, and sadly still got this from the debug:
--- !ruby/object:ComUser
attributes:
def_jabatan_id: "1"
created_at: 2010-11-16 04:31:35
def_user_role_id: "1"
gsm: "-"
updated_at: 2010-11-16 04:31:35
alamat: "-"
username: admin
id: "1"
def_kelamin_id: "1"
password: admin
online_status: "2"
attributes_cache: {}
Restarting mongrel does not help. Debug still returns the same thing, without
any relationship that can be seen.
regards,
Arga
From: Tim Shaffer <timshaffer@me.com>
On Nov 16, 7:17 am, arga aridarma <arga_arida...@yahoo.com> wrote:
> Am I missing something here, like violating a naming convention or something?
When you specify the association with "has_one" or "belongs_to", you
should be using lowercase_underscore instead of CamelCase.
For example:
"has_one :ComUser" should be "has_one :com_user"
"belongs_to :DefKelamin" should be "belongs_to :def_kelamin"
--
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-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home