Skip to content

Commit

Permalink
Merge pull request #3553 from nilbus/reduce-db-lookups
Browse files Browse the repository at this point in the history
Only check $flipper feature flags for page requests
  • Loading branch information
Katrina Owen committed Jun 5, 2017
2 parents 5a59302 + e2188c3 commit 0c37457
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/routes/profile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module ExercismWeb
module Routes
class Profile < Core
before do
if $flipper[:advertise_cli_update].enabled?(current_user) && page_request?
if page_request? && $flipper[:advertise_cli_update].enabled?(current_user)
client_version = ClientVersion.new(user: current_user)
flash.now[:notice] ||= client_version.notice_when_client_outdated
end
Expand Down

0 comments on commit 0c37457

Please sign in to comment.