我試圖創建一個窗體來創建一個用戶。目前,我有如何使用form_for?
- form_for @user do |f|
= "Username"
%br
= f.text_field :username
%br
= "Password"
%br
= f.text_field :password
%br
= "Confirm Password"
%br
= f.text_field :password_confirmation
%br
= "Email"
%br
= f.text_field :email
%br
= f.submit "Submit app"
我不斷收到錯誤undefined method 'password' for #<User:0x8e20750>
用戶確實有一個方法密碼=,但因爲我的加密密碼之前我儲存,沒有密碼的方法。任何人都有解決方法或修復?