小编Dhi*_*esh的帖子

如何在Rails中区分相同的命名辅助方法?

我在两个不同的帮助器中创建了辅助函数(link_to_alert)

  1. 应用程序/佣工/ posts_helper.rb
  2. 应用程序/佣工/ students_helper.rb

现在,打电话给我的助手功能link_to_alertapp/views/student/index.html.haml

问题是调用相同函数的视图 app/helpers/posts_helper.rb

如何app/helpers/students_helper.rb从我的 app/views/student/index.html.haml视图中调用辅助函数?

ruby-on-rails-3

2
推荐指数
1
解决办法
1564
查看次数

标签 统计

ruby-on-rails-3 ×1