以下是我如何将值/变量传递给局部视图的方法:
```html
```html
这里是我如何将值/变量传递给局部视图:
```<%= render "partials/banner", :locals => {:text_1 => t(:"main.home.banner_text_1"),
:text_2 => t(:"main.home.banner_text_2") } %>
然后在局部文件中:
<%= text_1 %> <%= text_2 %>
但是出现了“未定义的局部变量或方法text_1”
我应该在哪里设置这个变量,以便它可以从我应用程序中的所有视图和布局中访问?
谢谢!