Reopening the class instead of assuming it is already defined
Reopening the class instead of assuming it is already defined

Since https://github.com/rails/rails/commit/d0bb43d621c471659d03504f48f0197c0ae3b57c
The this class is not defined inside the on_load hook of Active Record
when checking for pending migrations.

Closes rails/rails#10109

rails/protected_attributes,westonganger/protected_attributes_continued,gauthier-delacroix/protected_attributes,globalxolutions/protected_attributes