tec*_*ams 0 ruby ruby-on-rails view-helpers ruby-on-rails-4
我使用的是一个简单的link_to,我们总是在我的rails应用程序中使用它,但它给出了这个错误.
wrong number of arguments (1 for 0)
我的代码在视图中.
<%= link_to category.name store_path %>
Run Code Online (Sandbox Code Playgroud)
在URL和控制台中运行时,路径是正确的.
2.2.3 :003 > app.store_path
=> "/store"
Run Code Online (Sandbox Code Playgroud)
我不明白为什么这会引起争论.