Retrive record without id field

0 views
Skip to first unread message

Sushrut Sathe

unread,
Apr 3, 2009, 10:09:54 AM4/3/09
to rubyonra...@googlegroups.com
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.
--
Posted via http://www.ruby-forum.com/.

Frederick Cheung

unread,
Apr 3, 2009, 10:26:26 AM4/3/09
to rubyonra...@googlegroups.com

On 3 Apr 2009, at 15:09, Sushrut Sathe 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

Reply all
Reply to author
Forward
0 new messages