I have two tabels user and friends,
The user tabel looks like this:
[id, name, image, location, highschool_name, highschool_year, college_name, college_year, graduteschool_name, graduate_year ]
And the friend tabel looks like this:
[id, uid, name, image, higschool_name, college_name, graduateschool_name, user_id]
I would like to group Users friends by eduaction:
- Group users friends by highschool_name
- Group users friends by college_name
- Group users friends by graduateschool_name
Like this photoshop mockup I made:

I am dev in Rails 3 and would like to use active record to do this, any tip or ideas are welcome.
You should create higschool, college and graduateschool models and use relations to users.
And friends data should be on user model.
So you should have
So, now I think you can do something like.