# Generate Parameters for a filter

**URL:** <https://www.ruby-forum.com/t/generate-parameters-for-a-filter/142662>\
**Category:** Rails\
**Created:** [July 10, 2008, 4:35am UTC](https://www.ruby-forum.com/t/generate-parameters-for-a-filter/142662 "2008-07-10T04:35:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sean\_CSHess](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/94ad74/32.png) [@Sean\_CSHess](https://www.ruby-forum.com/u/Sean_CSHess)\
**Post date:** [July 10, 2008, 4:35am UTC](https://www.ruby-forum.com/t/generate-parameters-for-a-filter/142662/1 "2008-07-10T04:35:47Z")

</div>

Hey all,

I want to filter /game/list by several different parameters. If I  
type in a url like /game/list/?category=5&players=2 category and  
players come in on the params hash.

Is there a railsy way to generate such a url? I would like to be able  
to change the filter options individually without affecting the  
others. For example, to be able to easily change it to /game/list?  
category=3&players=2 without any string parsing.

Or, if this is the wrong approach, how should I be sending filter  
options to my game controller?

Thanks for your help!
