Fetching records from tables

Dear all,

I have a doubt,

How to fetch records from tables, which are not having ID field as its
primary key.
If possible, please tell me to way to extract data from those tables.

“Nahalingam N. Kanakavel”
[email protected] wrote in message
news:[email protected]

Nahalingam N. Kanakavel.
(http://www.nahalingam.bravehost.com/PlanetN/)

have you tried dynmaic finders? e.g.

User.find_by_username(‘alan’)
User.find_by_foo(‘bar’)

you can just append the column name to find_by_

Hi,

No, I don’t want to do that,
I have tried the things which is given in the following link.

http://wiki.rubyonrails.org/rails/pages/HowToUseLegacySchemas

Thats what I have searched for, atlast I got that of my own too.

Thanks a lot for your efforts to resolve my problem.
Anyway your assistance also a new information to me. It will surely help
me
some time.

Thanks and regards,