Forum: Ruby on Rails NoMethodError

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
oreo (Guest)
on 2005-12-10 12:00

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
statements, it will run through it without an error.

  def create
    @person =[:person])
      flash[:notice] = 'Person was successfully created.'
      redirect_to :action => 'list'
      render :action => 'new'

Hope someone can help. Thanks in advance.
peter.j.donald (Guest)
on 2005-12-10 12:08
(Received via mailing list)

You need to provide more information for us to be able to provide
you with a useful answer. I would suggest sending along snippets
relevent Person model, SQL DDL for persons table and a stack
trace. However I suspect that the error you are receiving is because
you are trying to validate a column that does not exist in you database
or in your model.


Peter D.

oreo <> (Guest)
on 2005-12-11 00:02
awesome - you were correct. login was a field that was no longer being
used. Thanks!!!
This topic is locked and can not be replied to.