ActiveRecord tree structures using PostgreSQL.