What is the proper way to use namespaces and reference models inheriting from other (mongoid/rails)?
问题 I have the model HandlingScenario who inherits from Scenario . Like this: ## models/scenario.rb class Scenario include Mongoid::Document end ## models/scenarios/handling_scenario.rb class Scenarios::HandlingScenario < Scenario include Mongoid::Document belongs_to :user, :inverse_of => :handling_scenarios # In the `User` model, the reference is `has_many :handling_scenarios` end But when I try to access the HandlingScenario class, I get into trouble: ➜ rails c Loading development environment