I’m getting NoMethodError when I’m trying to save to the database. Here
is the error.
NoMethodError in Person#create
undefined method `login’ for #Person:0x378b728
The error points to the below def. If I remove the if @person.save
statements, it will run through it without an error.
@person = Person.new(params[:person])
flash[:notice] = ‘Person was successfully created.’
redirect_to :action => ‘list’
render :action => ‘new’
Hope someone can help. Thanks in advance.