superclass mismatch for class User - inheriting from ActiveRecord::Base
问题 I am trying to figure out my superclass mismatch error. All the posts I've read about this describe the problem as being that User is defined twice as a class in my application. In my case, it isn't defined twice. I have a services folder and within that I have a user folder (for user service classes). In that user folder, I have a file called organisation_mapper_service.rb, with: class User < ActiveRecord::Base class OrganisationMapperService def self.call(user: u) new(user: user).call end