Sorry if this is a double post but I had browser issues.
I had a similar problem and this is how I solved it.
First, switch to the awesome_nested_sets gem. After installing the
gem, you will need to add a couple fields and run a rebuild command.
See the instructions here ->
My nested set is called 'Library' and I only wanted users to see
libraries that were either created for their company or not assigned
to any company (ie. library.company_id == user.company_id or
library.company_id == nil).
I created this user method:
libraries = Library.arel_table
And call it from the controller using:
@libraries = current_user.libraries.order('lft ASC')
In the view, I create a table and then use the jquery.treeTable.js to
created a widget that allows for easy navigation of the tree/sets.