Displaying 4 results from an estimated 4 matches for "registeredphones".
Did you mean:
registeredphone
2006 Apr 20
5
nil object when you didn''t expect it
Hi,
I''m new to rails and finding it hard to figure out what this error is
referring to. Can anyone help please?!!
NoMethodError in Registeredphone#list
Showing app/views/registeredphone/list.rhtml where line #24 raised:
You have a nil object when you didn''t expect it!
The error occured while evaluating nil.txtForename
Extracted source (around line #24):
21:
2006 Apr 11
7
Undefined Method
...ed source (around line #23):
20: </font>
21: </td>
22: <td>
23: <%= link_to tblregisteredphone.tbluser.txtForename,
24: :action => "list",
25: :tbluser => "#{tblregisteredphone.tbluser.txtForename}" %>
26: </td>
The tblregisteredphones model and controller are as follows:
Model:
class Tblregisteredphone < ActiveRecord::Base
set_table_name "tblregisteredphones"
belongs_to :user,
:foreign_key => "intUserID"
set_primary_key(:TblRegisteredPhonesID)
end
Controller:
class TblregisteredphoneController <...
2006 Apr 04
16
No Method Error
This is the error that keeps appearing. I don''t understand why
"@tblusers" is not correct. Can anyone help?
NoMethodError in Tblregisteredphone#new
Showing app/views/tblregisteredphone/new.rhtml where line #20 raised:
You have a nil object when you didn''t expect it!
You might have expected an instance of Array.
The error occured while evaluating nil.each
Extracted
2006 Apr 11
1
Foreign Keys
Hi,
My tables are as follows:
"tblusers" - primary key "TblUsersID"
"tblregisteredphones" - primary key "TblRegisteredPhonesID"
- foreign key "intUserID"
My models are as follows:
class Registeredphone < ActiveRecord::Base
set_table_name "tblregisteredphones"
belongs_to :user,
:foreign_key => "intUserID"...