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 :)

Greets,

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

  • Colin Law at Feb 26, 2012 at 9:21 pm

    On 26 February 2012 12:25, Timen E. wrote:
    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 :)
    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
    Greets,

    --
    Posted via http://www.ruby-forum.com/.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.


    --
    gplus.to/clanlaw

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • 张毅 at Feb 28, 2012 at 11:32 am
    You can modify the migration script of posts using catname to place of
    cat_id

    2012/2/26 Timen E. <lists@ruby-forum.com>
    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 :)

    Greets,

    --
    Posted via http://www.ruby-forum.com/.

    --
    You received this message because you are subscribed to the Google Groups
    "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to
    rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at
    http://groups.google.com/group/rubyonrails-talk?hl=en.
    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedFeb 26, '12 at 12:25p
activeFeb 28, '12 at 11:32a
posts3
users3
websiterubyonrails.org
irc#RubyOnRails

3 users in discussion

Colin Law: 1 post Timen E.: 1 post 张毅: 1 post

People

Translate

site design / logo © 2021 Grokbase