After having tried pretty much every solution out there for CTI in AR,
I’m now trying out the native postgres inheritance support. After a
couple of activerecord hacks, I have it mostly working, but am running
into some issues. The main problem seems to come when a child model
is loaded through an association which points to the parent. Code is
It seems that in some cases, activerecord queries the parent tables
attributes to determine the valid attributes instead of the child.
Sometimes calling reload brings in the actions. However, when inside
an association, it seems a different version of reload gets called
from activerecord::relation instead of activerecord::persistence.
That version of reload seems to always use the parent table.
I’ve spent a few hours inside the internals of AR, but I’m in over my
head. Any activerecord ninjas out there have any idea how I can work
And if any core team members are around, any chance of a real CTI
implementation ever making it into activerecord?
I’ve seen about a million workarounds for this, but they’re all pretty