Newb Question association

Hey there,

I just started R(oR) 2 days ago and still figuring out quite some stuff.
I kinda understand the scaffolding and associating between models.

However, as a next step i'm trying to make a category list and add some
posts under a pre-fab out of database category. I managed to save a post
with a cat_id manually via the rails console. However i can't seem to
read them out on my screen as such. I want Postname -> Catname instead
of Postname -> cat_id.

And with that, i'd like to get a dropdown/select input on my Post-adding
page with the categories and their ID's in it.

I tried out some tutorials(Like the "Getting started with" on the
rubyonrails.org website. They speak about tags there, but i can't figure
out how to automate it by getting the names from a different DB table)

Thanks in advance, hope my question makes sense :slight_smile:

Greets,

You can modify the migration script of posts using catname to place of cat_id

Hey there,

I just started R(oR) 2 days ago and still figuring out quite some stuff.
I kinda understand the scaffolding and associating between models.

However, as a next step i'm trying to make a category list and add some
posts under a pre-fab out of database category. I managed to save a post
with a cat_id manually via the rails console. However i can't seem to
read them out on my screen as such. I want Postname -> Catname instead
of Postname -> cat_id.

And with that, i'd like to get a dropdown/select input on my Post-adding
page with the categories and their ID's in it.

I tried out some tutorials(Like the "Getting started with" on the
rubyonrails.org website. They speak about tags there, but i can't figure
out how to automate it by getting the names from a different DB table)

Thanks in advance, hope my question makes sense :slight_smile:

I suggest that you work right through a good tutorial such as
railstutorial.org (which is free to use online) in order to pick up
the basics. Also look through the Rails Guides. Make sure you have
installed the correct version of rails for any tutorial you use.

Colin