just started learning ruby and RoR a few days ago. There aren't many tutorials on Version 2 so I went with a version 1 one. I'm going through the ONLamp one, found here:
I got the scafolding and db stuff sorted out (as in the way its meant to be done in version 2) but I noticed that in the tutorial rails created a list view which is effectively the same as index view except it offers a way to filter results by category. RoR 2 doesn't seem to be creating such a view. So how do I get this behaviour in rails 2? I tried creating a list method (exactly same as in the tutorial) in the recipes controller and calling that from the application.hmlt.erb file using: <%= link_to "Show all recipes", :controller => "recipes", :action => "list" %> but that crashes while calling the show method. why? isn't it supposed to be calling the list method instead? alternatively I tried modifying the index method to filter results if the category_id variable is set but then rails complains that I supplied wrong number of parameters in the index method. And I have a feeling that that's not the right way of doing it anyway.