2

Rails 4でこれを行う方法は何ですか?

Rails 3の場合、これは機能します:

config.autoload_paths += Dir[ Rails.root.join('app', 'models', '**/') ]

しかし、Rails 4 では、名前空間が存在しないという不平を言って失敗します ( のよう app/models/users/credits.rbにエラーが発生します

Unable to autoload constant User::Credits, expected
4

1 に答える 1