diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb index 6a1772c8b..27d02d56e 100644 --- a/app/controllers/welcome_controller.rb +++ b/app/controllers/welcome_controller.rb @@ -126,6 +126,8 @@ class WelcomeController < ApplicationController :project_type => Project::ProjectType_project) when :courses redirect_to courses_search_path(:name => search_condition) + when :contests + redirect_to contests_search_path(:name => search_condition) when :users redirect_to users_search_path(:name => search_condition) when :users_teacher diff --git a/app/views/welcome/contest.html.erb b/app/views/welcome/contest.html.erb index 4efbbe6d4..bd8be87a3 100644 --- a/app/views/welcome/contest.html.erb +++ b/app/views/welcome/contest.html.erb @@ -131,12 +131,12 @@ -
- <%= form_tag({controller: 'contests', action: 'index'}, method: :get) do %> +
+ <%= form_tag({controller: :welcome, action: :search }, method: :get) do %> <%= text_field_tag 'name', params[:name], :placeholder => l(:label_search_intimation), name: "name", :class => 'blueinputbar', :style => 'width:240px; padding-right:50px;'%>   <%= hidden_field_tag 'project_type', params[:project_type] %> - <%= submit_tag l(:label_search), :class => "enterprise" , :name => nil%> + <%= submit_tag l(:label_search), :class => "enterprise", :name => "contests_search" %> <% end %>