Topic: undefined method `key?' for nil:NilClass

Hey, guys.

Have next model and controller:

class Advert < ActiveRecord::Base
  attr_accessible :age_id, :breed_id, :castration_id, :chip_id, :color_id, :coloring_id, :ears_id, :email, :first_name, :hair_id, :image, :last_name, :pet_id, :phone, :place_id, :size_id, :tail_id

  belongs_to :age, :breed, :castration, :chip, :color, :coloring, :ears, :pet, :place, :size, :tail, :hair       

end

class AdvertController < ApplicationController
  def create
  end
end

When i run http://localhost:3000/advert/create, show error undefined method `key?' for nil:NilClass. I thnk its problem with model, but cant found error.

Re: undefined method `key?' for nil:NilClass

We need the view, too.