# Creating a list view in rails 2

**URL:** <https://www.ruby-forum.com/t/creating-a-list-view-in-rails-2/141332>\
**Category:** Rails\
**Created:** [June 24, 2008, 6:55pm UTC](https://www.ruby-forum.com/t/creating-a-list-view-in-rails-2/141332 "2008-06-24T18:55:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pavel989](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/48db29/32.png) [@pavel989](https://www.ruby-forum.com/u/pavel989)\
**Post date:** [June 24, 2008, 6:55pm UTC](https://www.ruby-forum.com/t/creating-a-list-view-in-rails-2/141332/1 "2008-06-24T18:55:21Z")

</div>

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:

> **[Radar - O’Reilly](https://www.oreilly.com/radar/?page=1)**
>
> Now, next, and beyond: Tracking need-to-know trends at the intersection of business and technology

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.
