0
undefined local variable or method `nov_tisk_revij_index' for #<#<Class:0x007f361551b858>:0x007f3615519c60>
嘿,夥計們,我在爲一個Rails應用程序提供支持,無法弄清楚什麼是錯的。我使用rails g controller nov_tisk_revij index show
來創建我的視圖和控制器,現在我無法鏈接到它。如果你能發現我做錯了什麼,我會非常感激,不想因爲花費相當多的工作而重做。rails4,NameError in Zic#index,routes
耙路線的回報:
Prefix Verb URI Pattern Controller#Action
nov_tisk_revij_index GET /nov_tisk_revij/index(.:format) nov_tisk_revij#index
nov_tisk_revij_show GET /nov_tisk_revij/show(.:format) nov_tisk_revij#show
zic_index GET /zic/index(.:format) zic#index
root GET/ zic#index
我的html:
<%= link_to 'Novi izvodi tiskanih revij', nov_tisk_revij_index %>
路線:
get 'nov_tisk_revij/index'
get 'nov_tisk_revij/show'
get 'zic/index'
我嘗試添加resources :nov_tisk_revij
進路線,它仍然沒有工作,只是創建了我沒有的視圖的其他路線。
控制器:
我使用rails4紅寶石2