Topic: creating options within a model

Hi all,

I am trying to work out how to have options i.e. like html radio buttons when creating the model. Is this done through "rails generate model Post name:string" etc or is it by using just the standard html radio buttons, if so how is this done.


Many thanks

Re: creating options within a model

Hi,

First, create your model. After generating your model, set up a form which includes many options as HTML tags.

life is not short however you think to learn Rails

Re: creating options within a model

zombiebit wrote:

Hi,

First, create your model. After generating your model, set up a form which includes many options as HTML tags.

Hi Zombiebit,

Thanks for the suggestion. I guess before i make the model i will have a field:type i.e. option:string so that when i submit the page the option that was selected will be put into the db.


Thanks again.