Women in Technology

Hear us Roar



Article:
  Rolling with Ruby on Rails, Part 2
Subject:   "Showing recipes in a category" code
Date:   2005-03-10 03:37:24
From:   curth
Response to: "Showing recipes in a category" code

Oops, you are correct, I should have written:

def list
@category_id = @params['category']
@recipes=Recipe.find_by_category_id(@category_id)
end
Main Topics Oldest First

Showing messages 1 through 1 of 1.

  • "Showing recipes in a category" code
    2005-03-11 15:46:16  automat_svet [View]

    I get this error: undefined method `each' for nil:NilClass
    sure I'm doing something wrong in list.rhtml :-(

    any suggestion?
    Thanks