Skip to content

Commit f8933ec

Browse files
committed
OTWO-7667 Removed ApplicstionHelper from people conroller
1 parent 8bc4aca commit f8933ec

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

app/controllers/people_controller.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# frozen_string_literal: true
22

33
class PeopleController < UnclaimedController
4-
include ApplicationHelper
54
helper KudosHelper
65

76
before_action :find_index_people, unless: :query_or_cache_exist, only: [:index]
@@ -12,6 +11,10 @@ def rankings; end
1211

1312
private
1413

14+
def only_device?
15+
request.env['HTTP_USER_AGENT']&.match?(/(iPhone|BlackBerry|Android)/)
16+
end
17+
1518
def query_or_cache_exist
1619
key = only_device? ? 'people_index_page_device' : 'people_index_page'
1720
params[:query].blank? && Rails.cache.exist?(key)

0 commit comments

Comments
 (0)