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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
You can modify the migration script of posts using catname to place of cat_id 2012/2/26 Timen E. <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 26 February 2012 12:25, Timen E. <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.