Forum: Ruby on Rails Limiting records selected from table in db

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.
129def046960c37f0105d8b0a5acaeec?d=identicon&s=25 Lewis (Guest)
on 2007-04-02 15:07
(Received via mailing list)
Hi all,

I have a table within my application database that stores addresses
(i.e.  Businesses, residents, libraries, hospitals etc).  I want to
select from that table only residents (defined as addr_type = "R" in
addr_type_table) and display a list of these addresses and then be
able to do a find of ex.  Jane Doe.  I have the find worked out,
however I have not been able to successfully limit my initial list of
addresses to only those of type= "R".   If I do it in the controlller,
then on initial start up on get all types of addresses.  I have tried
to work through the model to limit the records but have had no luck.
Can anyone help?

This topic is locked and can not be replied to.