Article:
  Rolling with Ruby on Rails, Part 2
Subject:   the value of the drop down list will not be save..
Date:   2006-02-26 23:15:44
From:   asianians
why is it that when i tried to save some records, the value of my drop down list will not be saved, while the data on the textboxes are saved....why???what could have been wrong??
Main Topics Oldest First

Showing messages 1 through 2 of 2.

  • the value of the drop down list will not be save..
    2006-03-17 11:24:32  dLong [View]

    I found that if I didn't actually select a choice from the category_id drop down menu it would assign a "0" to that recipe's category_id field. For example, when I was updating the "Hot Chips" recipe after adding the category_id, the drop down menu desplayed "Snack" without my selecting it, but when I clicked on the update button I got an error when Recipe's list.rhtml tried to deslay the assigned categories.
  • Curt Hibbs photo the value of the drop down list will not be save..
    2006-02-27 03:35:19  Curt Hibbs | O'Reilly AuthorO'Reilly Blogger [View]

    Could you post more details.

    Also, Instant Rails contains the full working source code for this cookbook app if you want to compare a working version against what you have:

    http://instantrails.rubyforge.org/