My effort here:

https://gist.github.com/seifertd/5718964

I think this would be easier to work with if implemented using classes and
a utility method that converted a user to a nested hash.

-Doug


On Wed, Jun 5, 2013 at 5:02 PM, Tamara Temple <tamouse.lists / gmail.com>wrote:

> Oli Sanders <lists / ruby-forum.com> wrote:
> > Joel Pearson wrote in post #1111319:
> > > You have attributes like "is supervisor". Maybe a Hash isn't the best
> > > way to do this. What about a custom class with its own attributes and
> > > links?
> > >
> >
> > Hi Joel,
> > Thanks for responding. I had considered something like that but I want
> > to generate different views based on the proposed structure.
> >
> > I think the nested structure would make that easier, and also help me
> > when I need to edit it in forms (eventually).
>
> Actually, I'd go ahead and use ActiveRecord or Sequel with an sqlite
> database, which can be memory mapped if you don't want it to persist
> across uses. This lets you do ORMish things like:
>
> user.name
> user.id
> user.supervisor
> user.supervisor.name
> user.supervisor.supervisor.supervisor.name (and so on)
>
> And if you end up with even more attributes, win.
>
>