0

我有这个:

# /app/events/account_cancelled.rb:
module Events
  class AccountCancelled < Base::TrackEvent

#/app/events/base/track_event.rb:
module Events
  module Base
    class TrackEvent < Event

#/app/services/website/base.rb:
module Services
  module Website
    class Base

我收到一个错误:

Expected <snip>/app/services/website/base.rb to define Base
   from <snip>/app/events/account_cancelled.rb:2

我尝试完全限定因此的类定义AccountCancelled

module Events
  class AccountCancelled < Events::Base::TrackEvent

但我得到完全相同的错误。顺便说一句,在我将所有这些libapp. 这里发生了什么?

更新

我也尝试过继承自::Events::Base::TrackEvent. 同样的错误。

4

1 回答 1

-1

/app/events/account_cancelled.rb期望::Baseor Events::Base,但 /app/services/website/base.rb:给出Services::Website::Base. 他们不匹配。

于 2013-07-14T18:37:20.403 回答