wisper-activerecord
wisper-activerecord copied to clipboard
Fixing incompatibilities caused by Rails 6
Addresses issue reported in #29
Given what has been found as being the root cause of this (details), I wonder if Wisper could black list ActiveRecord::SchemaMigration
as a known AR model users are not really interested in anyway.
@fxn, In theory Wisper could filter out the SchemaMigration, however, I think the real issue resides in the fact that ActiveRecord callbacks are invoked when SchemaMigration changes are performed. Maybe the hooks should not be called for ShemaMigration?
From the point of view of Active Record, ActiveRecord::SchemaMigration
is a class mapped to a database table. The ORM is using itself. In that sense, it is not special. Active Record has no concept of internal vs "application" models. In particular, the model lifecycle is generic.
On the other hand, that class might be considered to be special for Wisper. I mean, are users enabling Wisper::ActiveRecord.extend_all
interested in all AR models for real? Or are they interested in application models only really? (I don't have an opinion, Wisper authors are the best ones to judge.)