Forum: Ruby on Rails Retrive record without id field

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Sushrut S. (Guest)
on 2009-04-03 18:09
Hi,
How to retrive the record without using the id field.
I have to use the table having singular and in that table there is no id
field then how to fetch that table in my application.
Frederick C. (Guest)
on 2009-04-03 18:27
(Received via mailing list)
On 3 Apr 2009, at 15:09, Sushrut S. wrote:

>
> Hi,
> How to retrive the record without using the id field.
> I have to use the table having singular and in that table there is
> no id
> field then how to fetch that table in my application.

You could use find :first or find :all, just specify whatever
conditions are relevant.

Fred
This topic is locked and can not be replied to.