From 9db82030caf4b037b41e2b05b3b0e107ac60aa40 Mon Sep 17 00:00:00 2001 From: AntonioTerceiro Date: Sat, 7 Jun 2008 15:35:14 +0000 Subject: [PATCH] ActionItem410: fixing search form --- app/views/search/_search_form.rhtml | 2 +- test/functional/search_controller_test.rb | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/views/search/_search_form.rhtml b/app/views/search/_search_form.rhtml index 20381c5..f92f194 100644 --- a/app/views/search/_search_form.rhtml +++ b/app/views/search/_search_form.rhtml @@ -2,7 +2,7 @@ <% simple_search = false unless defined? simple_search %> -<% form_tag( { :action => 'index', :category_path => ( @category ? @category.explode_path : [] ) }, +<% form_tag( { :action => 'index', :asset => nil, :category_path => ( @category ? @category.explode_path : [] ) }, :method => 'get', :class => 'search_form' ) do %> <%= '

%s

' % form_title if defined? form_title %> diff --git a/test/functional/search_controller_test.rb b/test/functional/search_controller_test.rb index f0a8b27..c4436d9 100644 --- a/test/functional/search_controller_test.rb +++ b/test/functional/search_controller_test.rb @@ -814,6 +814,11 @@ class SearchControllerTest < Test::Unit::TestCase assert_equal 0, assigns(:calendar).size % 7 end + should 'submit search form to /search when viewing asset' do + get :index, :asset => 'people' + assert_tag :tag => "form", :attributes => { :class => 'search_form', :action => '/search' } + end + ################################################################## ################################################################## -- libgit2 0.21.2