Women in Technology

Hear us Roar

  Rolling with Ruby on Rails
Subject:   Update not working
Date:   2006-03-08 03:45:03
From:   umeshs_in
The Category_id in the recipes table is not getting updated. I even copied the source code and the result is the same.. Due to this my list.rhtml throws an error.


Full Threads Oldest First

Showing messages 1 through 3 of 3.

  • Curt Hibbs photo Update not working
    2006-03-08 13:40:45  Curt Hibbs | O'Reilly AuthorO'Reilly Blogger [View]

    If you are running on Windows, you could try using Instant Rails (http://instantrails.rubyforge.org/). It contains the cookbook app as a preinstalled sample application, which should just work out-of-the-box.

    Once you have something working, then you can compare against what's not working.
    • Update not working
      2006-05-21 22:47:44  guyhillyer [View]

      I experienced "update not working" and traced
      it to the case of the "name" attribute on the
      input tags in edit.rhtml.

      That is, I finally made it work by changing
      recipe[category_id] to Recipe[category_id].
      I gather that the posted "name" attribute
      is used as the model name, which is capitalized
      in the command "ruby script\generate model Recipe"

      Just reporting empirical results!
      • Update not working
        2006-06-08 19:52:47  guyhillyer [View]

        I posted too soon; I gathered wrong.
        The real problem was that I used
        "scaffold :Recipe" in the controller,
        instead of "scaffold :recipe", as
        the article prescribed.

        "Never mind"