现在,你可以在发动机<代码>/app目录内重开发动机类别,简单地在括号中添加相同的类别<代码>/app。 例如:
/my_engine/app/controllers/users_controller.rb
/my_app/app/controllers/users_controller.rb
即使在母体有相同名称的档案的情况下,从my_engine<>/code>上存档。 详情如下:
我正在寻找一种工作,使我能够把同一档案名称/格按与父母相同的道路,重新开张,而不是压倒这个类别。 Maybe 我失踪是显而易见的。 我能够用一个单独的档案(不同的档案名称)来进行这项工作,该档案使用“等值”,但我对这种办法并不感到非常高兴。 任何关于为此寻找解决办法的想法?
I am also wondering if there is a reason behind this restriction, or is it just a result of how rails loads files (see included link) and not intentional. It seems to me that changing the load behavior of engines to allow reopening classes in this manner would be a good feature in rails. I know it confused me at first, and I am sure other developers will struggle with this problem as well.