-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Labels
Description
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
Reactions are currently unavailable