NoMethodError in ClassifiedController#create

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’

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 S.
Review and compare Rails hosting companies

I don’t believe it! Thanks mate.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs