Forum: Ruby on Rails Class query: Classname.find(class)

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
420aefb1d5de8150ec86fb240196e1be?d=identicon&s=25 Andrew Madu (Guest)
on 2007-03-06 17:55
(Received via mailing list)
I have implemented the following:

    @newUser =
    @newUser.username = 'first'
    @newUser.userpassword = 'last'
    @userDetails = Usertbl.find(@newUser)

and am getting the following error message:

'Couldn't find Usertbl with ID=#<Usertbl:0x4783fa8>'

Why is this not allowed?


A97a75c945507f70992f579a730b0657?d=identicon&s=25 Doug Barth (Guest)
on 2007-03-06 17:58
(Received via mailing list)
find() expects either numeric ids or :first or :all followed by more
conditions. Please see
for more info.

- Doug Barth
This topic is locked and can not be replied to.