# Adding a path attribute to a form

**URL:** <https://www.ruby-forum.com/t/adding-a-path-attribute-to-a-form/191519>\
**Category:** Rails\
**Created:** [July 13, 2010, 8:14pm UTC](https://www.ruby-forum.com/t/adding-a-path-attribute-to-a-form/191519 "2010-07-13T20:14:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![daisagah](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b4bc9f/32.png) [@daisagah](https://www.ruby-forum.com/u/daisagah)\
**Post date:** [July 13, 2010, 8:14pm UTC](https://www.ruby-forum.com/t/adding-a-path-attribute-to-a-form/191519/1 "2010-07-13T20:14:33Z")

</div>

Hi there,

I’m using a form tag to implement a search text\_field.

```
<% form_tag catalogues_path(:select => params[:select]), :method

```

=\> “get”, :class =\> “search\_form” do %\>

The problem is the catalogues\_path which should consist a select  
param. Unfortunately the select param doesn’t get handed over in the  
upper example…

Any hint will be appreciated!

Thanks  
Makrus

---

<div class="post-metadata">

**Author:** ![daisagah](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b4bc9f/32.png) [@daisagah](https://www.ruby-forum.com/u/daisagah)\
**Post date:** [July 14, 2010, 2:32pm UTC](https://www.ruby-forum.com/t/adding-a-path-attribute-to-a-form/191519/2 "2010-07-14T14:32:05Z")

</div>

Makrus, as far as I understood your problem, you don’t have to  
include :select in your path manually. Since your form uses :get  
method, params will be sent via url automatically, you have only to  
name them properly:

```
    <% form_tag catalogues_path, :method => :get do %>
      <%= text_field_tag :select, params[:select] %> <%=

```

submit\_tag “Find”, :name =\> ‘’ %\>  
\<% end %\>
