[Rails] Re: No Method error

Alana
Tue, 11 Apr 2006 10:31:41 -0000

Ray Baxter wrote:
> 1. The list method doesn''t initialize tblregisteredphone. Is that
> initialized somewhere in your view before the exception?
>
> 2. Also, your create method doesn''t initialize tbluser_id.
> 3. Do all of your entries in tblregisteredphone have non-null tbluser_id?

1. This line is in my view:
 <% @tblregisteredphones.each do |tblregisteredphone| %>
Is this correct?

2. How do I initialize intUserID (the foreign key in tblregistered
phones) and is this the correct naming convention?
My tables are as follows:
"tblusers" - primary key "TblUsersID"
"tblregisteredphones" - primary key "TblRegisteredPhonesID"
                      - foreign key "intUserID"

3. All of the entries have a non-null intUserID.

Thank you for your help,