我一直坚持这个错误一段时间了,我已经环顾四周,显然这是由于end
太多了,但我似乎无法理解为什么,任何帮助人员?感谢。
这是我的代码
class UsersController < ApplicationController
def new
@user = User.new
end
def create
@user = User.new(params[:user])
if @user.save
redirect_to root_url, :notice => "Signed up!"
else
render "new"
end
答案 0 :(得分:3)
class UsersController < ApplicationController
def new
@user = User.new
end
def create
@user = User.new(params[:user])
if @user.save
redirect_to root_url, :notice => "Signed up!"
else
render "new"
end # your missed end here
end
end # another end missed for the class