Forum: Ruby on Rails get data from a table

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.
Dcf093a36c8a7e286dbefe10454813e1?d=identicon&s=25 Ishara Gunathilake (Guest)
on 2008-11-01 03:35
(Received via mailing list)
can anyone tell me,how can retrieve data from a specific modelwhen i
pass an
id.
as an example there's table called agent_detail,it includes
id, name, address
so  i wanna get name and address from that table which will be the of
row
id=10,
i just only want to pass id number and then i can be get the data
929c5c32f7903a1154be888822c5ec20?d=identicon&s=25 mrbless (Guest)
on 2008-11-01 06:12
(Received via mailing list)
SpecificModelName.find(10)
that's it

On Nov 1, 7:34 am, "Ishara Gunathilake" <jaimgunathil...@gmail.com>
This topic is locked and can not be replied to.