3

基本的に私はこれをロードしたい:

require "active_record/railtie"
require "active_resource/railtie"
require "action_mailer/railtie"

action_controllerこの特定の状況では私はそれを使用しないため、ロードしません。

Rails の master のコードを見ると、次のことがわかります。

# For now, action_controller must always be present with
# rails, so let's make sure that it gets required before
# here. This is needed for correctly setting up the middleware.
# In the future, this might become an optional require.
require "action_controller/railtie"

...だから私は疑問に思っていました: Rails をactive_record, active_resourceandだけでロードすることは可能ですか? それともaction_mailer常にロードする必要がありますaction_controllerか?

4

1 に答える 1