If I submit a new user form with errors, it redirects to the index page and then renders the new page on top of it. In the controller I specify that it should just render the new action so that the user can see/fix their errors and resubmit. Is there something obvious that I am missing?
Here's the create action in my controller code:
def create
@user = User.new(params[:user])
@user.role = "owner"
if @user.save
flash[:notice] = "Registration successful!"
else
flash.now[:notice] = "You have errors!"
render :new
end
end