From 43b5292303301da9e10b5dc2cf874fc7437b10af Mon Sep 17 00:00:00 2001 From: Ankur Sethi Date: Tue, 19 Aug 2014 20:15:24 -0400 Subject: [PATCH] Fix min_trust_level for wordpress min_trust_level in the wordpress method was being set to 1 always, the order of the ternary operator was reversed. --- app/controllers/topics_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/topics_controller.rb b/app/controllers/topics_controller.rb index 9e4cc9ac415..58d220525ce 100644 --- a/app/controllers/topics_controller.rb +++ b/app/controllers/topics_controller.rb @@ -79,7 +79,7 @@ class TopicsController < ApplicationController params.permit(:min_trust_level, :min_score, :min_replies, :bypass_trust_level_score, :only_moderator_liked) opts = { best: params[:best].to_i, - min_trust_level: params[:min_trust_level] ? 1 : params[:min_trust_level].to_i, + min_trust_level: params[:min_trust_level] ? params[:min_trust_level].to_i : 1, min_score: params[:min_score].to_i, min_replies: params[:min_replies].to_i, bypass_trust_level_score: params[:bypass_trust_level_score].to_i, # safe cause 0 means ignore