My question is this, I have my postgres database called gas_stations and only has a field called name, and I need that the form shows all the data in combobox from the table. also one of the options should appear “new station” and the truth I don’t know how to do this
My question is this, I have my postgres database called gas_stations and only has
Share
I think you tale about table and not database. To do this, you must to create a model called GasStation like this :
After that, you could create a list in your view like this :
See the guide here : http://guides.rubyonrails.org/getting_started.html.