jwood/tenacity — Issue #32: What about AR STI?
Author: yeggeps
Created: 2011-11-12 12:52:53+00:00
State: open

I have set up a User model and a Manager model with Single Table inheritance like this :

```
class User < ActiveRecord::Base
include Tenacity

t_has_many :posts, :foreign_key => "user_id"
end
```

```
class Manager < User
end
```

And a Mongoid model :

```
class Post
include Mongoid::Document
include Tenacity

field :name

t_belongs_to :user
end
```

However the association only works when the user is a User and not a Manager.
If i try to add posts to a manager I just get an empty array when trying to fetch them trough user.posts.

Any thoughts on this?
Thanks