[Rails] No Method error

Ben Reubenstein
Fri, 07 Apr 2006 16:05:34 -0000

Hi Alana ~

Are you sure you have an object tblregisteredphone that has data?  If that
is one of your models, you need to create an instance of that model.  Might
try putting <%= debug tblregisteredphone %> in your view to see if the
object is being created.  I would need to see what the controller is doing
to offer some more help.

~ Ben

On 4/7/06, Alana <alana@c4l.co.uk> wrote:
>
> I''m getting the following error and have checked and double
checked all
> my table and field names are correct. Only the field names have
> uppercase letters in them. Where am I going wrong?
>
> NoMethodError in Tblregisteredphone#list
>
> Showing app/views/tblregisteredphone/list.rhtml where line #23 raised:
>
> You have a nil object when you didn''t expect it!
> The error occured while evaluating nil.txtForename
>
> Extracted source (around line #23):
>
> 20:
> 21:
> 22:
> 23:      <%= link_to tblregisteredphone.tbluser.txtForename,
> 24:              :action => "list",
> 25:              :tbluser =>
"#{tblregisteredphone.tbluser.txtForename}"
> %>
> 26:
>
> Alana
>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>



--
Ben Reubenstein
http://www.benr75.com
-------------- next part --------------
An HTML attachment was scrubbed...