Skip to content

Commit

Permalink
[lib] Adding back in functionality that sets the current Thread's 'qu…
Browse files Browse the repository at this point in the history
…ery_reviewer_enabled' value. Minimum fix for fixing regressions.
  • Loading branch information
kellydunn committed Feb 8, 2013
1 parent 78fd8d2 commit 5c826a4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/query_reviewer/controller_extensions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ def add_query_output_to_view(total_time)
end

def perform_action_with_query_review(*args)
return unless (CONFIGURATION["enabled"] == true and cookies["query_review_enabled"]) ||
(CONFIGURATION["enabled"] == "based_on_session" and session["query_review_enabled"])
Thread.current["query_reviewer_enabled"] = (CONFIGURATION["enabled"] == true and cookies["query_review_enabled"]) || (CONFIGURATION["enabled"] == "based_on_session" and session["query_review_enabled"])

t1 = Time.now
r = defined?(Rails::Railtie) ? process_action_without_query_review(*args) : perform_action_without_query_review(*args)
Expand Down

0 comments on commit 5c826a4

Please sign in to comment.