Rails:如何在自定义目录中加载Rails助手方法?

时间:2020-09-13 12:57:20

标签: ruby-on-rails ruby

我正在构建模板库应用程序,当前,我将所有模板(.html.erb)存储在不同的目录中,除了传统的rails视图包含页面(如主页,联系人) ,等等。我当前的目录结构如下:

app
- controllers
- helpers
- components (this is the location where all the templates are stored)
- models
- views
- etc

默认情况下,所有helper方法都被加载到views目录中,我想知道是否有一种方法可以将所有rails帮助方法加载到{{1 }}目录。

0 个答案:

没有答案