First argument in form cannot contain nil or be empty Hartl's Rails 4 Tutorial

后端 未结 3 665
醉酒成梦
醉酒成梦 2021-01-14 16:13

I\'m working through Michael Hartl\'s Rails tutorial, and I\'m running into an issue in section 7.3.3. I receive this error message:

ArgumentError in Users#         


        
3条回答
  •  感动是毒
    2021-01-14 16:48

    I dont see a new action on you controller.

    def new
      @user = User.new
    end
    

    I maybe made indirectly, but it couldn't hurt defining it yourself. From you title that may be why the @user variable is nil, it wasn't defined.

提交回复
热议问题