active record problem

SELECT(

    SELECT t1.name


    FROM table1 t1


    WHERE t1.id = t2.table1_id


  )

FROM table2 t2

WHERE t2.number =67

table detail is this…

table2

id table1_id number

1 1 67

2 2 67

table1

    id 	  name 	    description


 	1 	value 1 	description


 	2 	value2 	    description

My link

This will helps You