I've been puzzling over this for quite some time now and can't figure it out.

I've got 2 models:

```
class Vehicle < ActiveRecord::Base
  attr_accessible :year, :capacity,
  :size, :body, :model_id, :maker_id, :parameters_attributes

    validates :year, numericality: { greater_than: 1900 }
    validates :year, :capacity, :size, :body, presence: true

    belongs_to :model
    belongs_to :maker
    has_many :parameters
    accepts_nested_attributes_for :parameters
    end

```

and

```
class Parameter < ActiveRecord::Base
  attr_accessible :tag, :value
  validates :tag, :value, presence: true
  belongs_to :vehicle
end

```

in new vehicle view i've got:

```
= form_for [:admin, @vehicle], html: { multipart: true } do |f|
    =# some other stuff in between
    = f.text_field :value, size: 4

```

I get this error

```
undefined method `value'

```

Just can't seem to get it working. Help, anyone?

EDIT
routes.rb

```
resources :vehicles 
resources :parameters

resources :makers do
  resources :models
end

```