Hello,
I have a model called abbonement which should contain a title and a amount.
Then I have a model called members which contains the name, adress, city and which abbonement the member has.
Can I then use belongs _to or is there a better way of doing this.
The abbonement is a drop down list which only contains the titles of the model abbonement.
Can anyone give me a tip how to handle this ?
Roelof
Best Way is to use Association belongs_to.
Oke,
I also have read that you could use : accepts_nested_attributes_for
But I cannot say in the model that on the member class I only need the title .
Since I guess you are a beginner with Rails I suggest you work right through a good tutorial such as railstutorial.org, which is free to use online. That will show you the basics of rails including the various associations.
Colin