Skip to content

Commit

Permalink
Fix search and tracker listing
Browse files Browse the repository at this point in the history
  • Loading branch information
nono committed Jun 25, 2018
1 parent 83454e1 commit b2dc2d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/controllers/search_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
class SearchController < ApplicationController

def index
params.permit!
redirect_to "https://duckduckgo.com/?#{params.slice(:q).to_query}+site%3Alinuxfr.org"
end

Expand Down
3 changes: 2 additions & 1 deletion app/controllers/trackers_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ class TrackersController < ApplicationController
respond_to :html, :md

def index
@attrs = {"state" => "opened"}.merge(params[:tracker] || {})
@attrs = params.require(:tracker).permit(:state, :category_id, :assigned_to_user_id)
@attrs = {"state" => "opened"}.merge @attrs
@order = params[:order]
@order = "created_at" unless VALID_ORDERS.include?(@order)
@trackers = Tracker.joins(:node).merge(Node.visible)
Expand Down

1 comment on commit b2dc2d3

@gle42
Copy link

@gle42 gle42 commented on b2dc2d3 Jun 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://linuxfr.org/suivi =====> 400 Bad request
Je pense que le fix de trackers_controller a cassé le suivi.

Please sign in to comment.