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 nil.save
Here’s my controller code. I’m totally new to ruby on rails so help
would be much appreciated
class ClassifiedController < ApplicationController
def list
@classifieds=Classified.find(:all)
end
def show
@classified=Classified.find(params[:id])
end
def new
@classified=Classified.new
end
def create
@classifed=Classified.new(params[:classified])
if @classified.save
redirect_to :action =>‘list’
else
render :action =>‘new’
end
end