How can I make this model the best ?


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 ?


Best Way is to use Association belongs_to.


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, which is free to
use online. That will show you the basics of rails including the
various associations.