-1
我的問題屬於Rails命名約定難題。我的應用程序已經註冊,登錄,註銷功能。Rails命名約定問題
對於註冊頁面,我使用了form_for(@user)
幫手。
對於登錄頁面,我使用了form_for(:session, url: sessions_path)
。但是在我的routes.rb文件中,我已經包含了resources :sessions
而不是如登錄頁面中form_for helper參數中提到的單數形式。
,如果有人能:
1)解決這種特殊的form_for問題
2.) More importantly point me in the direction where I can learn/read about Rails naming conventions, I would be highly indebted.
所以你基本上是說,存在之間沒有相關性:在的form_for助手和會話符號的資源:會議?我可以調用任何參數,即form_for(:foobar,sessions_path)? –
這正是我所說的 –