How can I make this model the best?


I have a model called abbonement which should contain a title and a

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.

Best Regards,

Gopinath M

Ruby on Rails Developer

Contact : +91-9994652146

Skype Id : gopinath.murugan

Email : [email protected]


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 .


Op woensdag 25 juni 2014 12:14:29 UTC+2 schreef M,Gopi M.gopinath:

On 25 June 2014 11:10, Roelof W. [email protected] wrote:

model abbonement.

Can anyone give me a tip how to handle this ?

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.


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs