Closed lowjoel closed 10 years ago
What is the problem here?
I'll try to get you a repro. No time to give a more detailed explanation at the moment.
Thanks
On Thu, Jul 17, 2014 at 2:35 AM, Joel Low notifications@github.com wrote:
I'll try to get you a repro. No time to give a more detailed explanation at the moment.
— Reply to this email directly or view it on GitHub https://github.com/hzamani/acts_as_relation/pull/67#issuecomment-49234140 .
@hzamani I think this might not be needed any more since we now set the inverse_of in the has_one relation we inject into the subclass. Let me merge master and try again.
I think it's working after placing in inverse_of. When I remove inverse_of I get this behaviour.
This is a case which can happen when there is a 1:many relationship between some other model and the superclass. You will have to use the #superclass message to obtain the superclass instance. However, there is no reverse relationship. So when the relationship from the superclass object is persisted, the derived object is not, because the relationship is one-way.
Example (using sample app, derived from my own code base)
The Producible bit of the Pen will be saved, but the Pen itself will not.