Commit 9db82030caf4b037b41e2b05b3b0e107ac60aa40

Authored by AntonioTerceiro
1 parent 50ba75f5

ActionItem410: fixing search form

in /assets/${stuff}


git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1908 3f533792-8f58-4932-b0fe-aaf55b0a4547
app/views/search/_search_form.rhtml
... ... @@ -2,7 +2,7 @@
2 2  
3 3 <% simple_search = false unless defined? simple_search %>
4 4  
5   -<% form_tag( { :action => 'index', :category_path => ( @category ? @category.explode_path : [] ) },
  5 +<% form_tag( { :action => 'index', :asset => nil, :category_path => ( @category ? @category.explode_path : [] ) },
6 6 :method => 'get', :class => 'search_form' ) do %>
7 7 <%= '<h3>%s</h3>' % form_title if defined? form_title %>
8 8  
... ...
test/functional/search_controller_test.rb
... ... @@ -814,6 +814,11 @@ class SearchControllerTest &lt; Test::Unit::TestCase
814 814 assert_equal 0, assigns(:calendar).size % 7
815 815 end
816 816  
  817 + should 'submit search form to /search when viewing asset' do
  818 + get :index, :asset => 'people'
  819 + assert_tag :tag => "form", :attributes => { :class => 'search_form', :action => '/search' }
  820 + end
  821 +
817 822 ##################################################################
818 823 ##################################################################
819 824  
... ...