1] I had a “Patient” model which is in a one to one relationship with
the “PersonName” model
class Patient < ActiveRecord::Base
class PersonName < ActiveRecord::Base
2] “person_name” has the “last_name” and “first_name” as 2 of the fields
3] I am trying to find the Patient on the basis of his last_name , how
do i go about doing this , any example’s will be HIGHLY appreciated.
The way i entered the data in was first create a PersonName
@personName = PersonName.new ( :last_name => “jack” , :first_name =>
@patient.person_name = @personName
Thanks in advance.