Forum: Ruby on Rails NoMethodError in ClassifiedController#create

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.
7492b14ddb61f186cdb44843ac5a3ac1?d=identicon&s=25 doucie (Guest)
on 2007-01-31 20:34
Hope you can help.  Getting the error message

NoMethodError in ClassifiedController#create
You have a nil object when you didn't expect it!
You might have expected an instance of ActiveRecord::Base.
The error occurred while evaluating

Here's my controller code.  I'm totally new to ruby on rails so help
would be much appreciated

class ClassifiedController < ApplicationController
def list

def show

def new

def create[:classified])
    redirect_to :action =>'list'
      render :action =>'new'
91308e9bc88cb069fd1bcf88e910d042?d=identicon&s=25 Nick Snels (nicksnels)
on 2007-01-31 21:01
Don't know if you copy pasted the code above, but I think you are
getting this error because you have a typo at:[:classified])

@classifed should be @classified

Kind regards,

Nick Snels
Review and compare Rails hosting companies
7492b14ddb61f186cdb44843ac5a3ac1?d=identicon&s=25 doucie (Guest)
on 2007-01-31 21:41
I don't believe it!  Thanks mate.
This topic is locked and can not be replied to.