cannot change :id in form.select(..)

Hi All

I have the following code

  form_for :MyPrice, :url => .....

    form.file_field :uploaded_data, :size => 17

    form.text_field :price, :class => :price_digits     form.text_field :price, :class => :price_frac

This works fine, however the 2 price text_fields have the same ID. So I would like to change this into

    form.text_field :price_digits, :class => :price_digits     form.text_field :price_frac, :class => :price_frac

But than I get the follwoing error:

undefined method `price_digits' for #<MyPrice:0x2156650>

Are there restrictions on the id ? What do I have to do to let this work ?

thnx a lot LuCa

I solved it, the id can only represent attributes of the model, which in my case is MyPrice. If the attribute doesn't exist the method doesn't exist too -> method undefined.

cheers LuCa