Rolling with Ruby on Rails, Part 2
Subject:   problem with validate_options
Date:   2005-03-21 23:53:43
From:   cocentaina
everything works for me, except the last part. When I try to change category names to links (which list recipes in a category), the .../recipe/list fails as:

ActionController::ActionControllerError in Recipe#list

Showing /recipe/list.rhtml where line #23 raised Unknown options: category

20: </font>
21: </td>
22: <td>
23: <%= link_to,
24: :action => "list",
25: :category => "#{}" %>
26: </td>

c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.4.0/lib/action_controller/url_rewriter.rb:31:in `validate_options'

obviously it won't accept 'category' as a parameter to a link. Where is this set? method list in recipe_controller is as it should be (everything else too probably).
Main Topics Oldest First

Showing messages 1 through 1 of 1.

  • Curt Hibbs photo problem with validate_options
    2005-03-22 04:03:15  Curt Hibbs | O'Reilly AuthorO'Reilly Blogger [View]

    I sorry, to have to respond like this, but I'm under a real tight deadline for the next few days (read extreme lack of sleep). I think the best thing to do is to post this problem to the rails mailing list. You can find a link to subscribe to it here:

    Be sure and tell them what version of Rails you are running (you can find out by running the command gem list).

    The Rails ML (and the Ruby ML) is a very friendly developer community. You could also go on the Rails IRC channel for more immediate feedback (info is on the same link above).