我想
class ApplicationController < ActionController::Base
include Foo
就是添加一个“mixin”——让Foo模块中的所有方法都被视为ApplicationController的方法。
但现在我看到的代码是
include Bar
class ApplicationController < ActionController::Base
include Foo
那么为什么它在外面ApplicationController
呢?这与把它放在里面的更常见的用法有什么不同ApplicationController
?