Rails 3 ActiveRecord Selecting Parent Child recursion from Single Table
===

I have a table called categories where the table structure and data is

    id | parent_id | name
    ------------------------
    1  | 0         | Computers    // parent
    2  | 0         | TV           // parent
    4  | 1         | Motherboards // child - to - id(1)
    5  | 4         | Mercury
    6  | 5         | Mecrury XXX
    7  | 6         | Mecrury YYY
(Where **parent_id** is **id** of another row)

Show how can i get parent/child results using **Rails3 Activerecord query interface**. (Or any other solution).

If i search for Computer how can i get all the childs -> super child under that parent category.

    Example Result will - Computers -> Motherboards -> Mercury XXX -> Mercury YYY

Thank You