activeldap/activeldap — Issue #29: Rails Resource Routing
Author: mklappstuhl
Created: 2012-01-13 12:55:59+00:00
State: open

I have this route:

```rails
resources :users

resources :groups do
resources :users
end
```

These models:

**user.rb:**

```rails
class User < ActiveLdap::Base

[...]

belongs_to :groups,
:many => 'memberUid',
:class_name => 'Group',
:foreign_key => 'uid'

[...]

end
```

**group.rb:**

```rails
class Group < ActiveLdap::Base

[...]

has_many :users,
:wrap => "memberUid",
:class_name => "User",
:primary_key => 'uid'

[...]

end
```

The following works:

```
g = Group.first
g.users.map{|member| member.id}
=> ["aborisov", "akoenig"]
g.users.first
=> #