On 11 May 2011 01:19, Tomas R. <li...@ruby-forum.com> wrote: > I have my articles migration > > create_table :articles do |t| > t.integer :category_id, :null => false > etc.. > > and my form > > Select a category > <%= f.select :category_id, Category.all.collect {|category| > [category.name, category.id ]} %> > > But everytime im sending that info im getting a nil value for > category_id
First look in development.log to see if it is being passed with the request ok. Then use ruby-debug to break into your code in the controller action (create or update presumably) and you can inspect the data to work out where it is getting lost. See the Rails Guide on debugging to find how to do that. Colin -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.