-
Jean Boussier authored
On constant missing Ruby call `#inspect` on the receiver to build the error message. For instance, the error message for `Foo::Bar` will be `"#{Foo.inspect}::Bar"`. And since Active Record override the model classes inspect method, this breaks `missing_name` assumptions. Until now it worked because missing_name was only called on errors raised by the classic autoloader, and the classic autoloader calls `#name` to build its error message.
Jean Boussier authoredOn constant missing Ruby call `#inspect` on the receiver to build the error message. For instance, the error message for `Foo::Bar` will be `"#{Foo.inspect}::Bar"`. And since Active Record override the model classes inspect method, this breaks `missing_name` assumptions. Until now it worked because missing_name was only called on errors raised by the classic autoloader, and the classic autoloader calls `#name` to build its error message.
Loading