# Search field in layout goes to another page

**URL:** <https://www.ruby-forum.com/t/search-field-in-layout-goes-to-another-page/146091>\
**Category:** Rails\
**Created:** [August 17, 2008, 7:48pm UTC](https://www.ruby-forum.com/t/search-field-in-layout-goes-to-another-page/146091 "2008-08-17T19:48:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tyliong](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e9a140/32.png) [@tyliong](https://www.ruby-forum.com/u/tyliong)\
**Post date:** [August 17, 2008, 7:48pm UTC](https://www.ruby-forum.com/t/search-field-in-layout-goes-to-another-page/146091/1 "2008-08-17T19:48:15Z")

</div>

i have a search form as part of a layout on one page. when i enter an  
object to search how do i bring it to another page? in order words not  
have layout default to the usual \<% yield %\>.

[layout]  
{ search box }  
[layout]  
[page]  
list.html.erb  
[page]

what i want to get :

[layout]  
{ search box }  
[layout]  
[page]  
search.html.erb  
[page]

---

<div class="post-metadata">

**Author:** ![tyliong](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e9a140/32.png) [@tyliong](https://www.ruby-forum.com/u/tyliong)\
**Post date:** [August 18, 2008, 9:11am UTC](https://www.ruby-forum.com/t/search-field-in-layout-goes-to-another-page/146091/2 "2008-08-18T09:11:15Z")

</div>

bump

---

<div class="post-metadata">

**Author:** ![tyliong](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e9a140/32.png) [@tyliong](https://www.ruby-forum.com/u/tyliong)\
**Post date:** [August 18, 2008, 10:50am UTC](https://www.ruby-forum.com/t/search-field-in-layout-goes-to-another-page/146091/3 "2008-08-18T10:50:52Z")

</div>

solved
