【问题标题】:concerns module of controllers as shared with concerns module of models?控制器的关注模块与模型的关注模块共享?
【发布时间】:2015-01-05 22:22:12
【问题描述】:

如果我在 controllers/concerns 文件夹中创建 FooConcern 模块,在 models/concerns 中创建 FooConcern 模块,则存在覆盖问题,或者我们可以像 disinct 模块一样使用它们?

【问题讨论】:

    标签: ruby-on-rails-4 module activesupport-concern


    【解决方案1】:

    答案是肯定的。 所以我在关注的控制器名称中添加了“Controller”以避免重复名称类。

    【讨论】:

      猜你喜欢
      • 2015-10-06
      • 2018-12-23
      • 1970-01-01
      • 2020-05-03
      • 2017-11-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多