summaryrefslogtreecommitdiff
path: root/app/controllers/search_controller.rb
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2013-05-09 07:12:42 -0600
committermo khan <mo@mokhan.ca>2013-05-09 07:12:42 -0600
commit3c282dd665dfdb6cd5880da5d3394b347f4739e8 (patch)
tree3d8d1b21c2f9ecf0141464d9da479586bceed007 /app/controllers/search_controller.rb
parentfdb71218fcf4f514cfbceb5ceb0df54166839923 (diff)
redirect to root url instead of route that does not exist.
https://cakeside.airbrake.io/groups/57695470
Diffstat (limited to 'app/controllers/search_controller.rb')
-rw-r--r--app/controllers/search_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb
index 74502e0a..26e66d65 100644
--- a/app/controllers/search_controller.rb
+++ b/app/controllers/search_controller.rb
@@ -1,8 +1,8 @@
class SearchController < ApplicationController
def index
@search = params[:q]
- if @search.blank?
- redirect_to(home_index_url)
+ if @search.blank?
+ redirect_to(root_url)
else
@creations = Creation.includes(:user).search(@search).page(params[:page]).per(100)
@members = User.includes(:avatar).where("upper(name) like upper(?)", "%#{@search}%")