cartodb-4.42/app/helpers/fullstory_helper.rb

12 lines
351 B
Ruby
Raw Normal View History

2024-04-06 13:25:13 +08:00
module FullstoryHelper
def insert_fullstory
if fullstory_enabled?(current_user)
render(partial: 'shared/fullstory', locals: { org: Cartodb.get_config(:fullstory, 'org') })
end
end
def fullstory_enabled?(user)
Cartodb.get_config(:fullstory, 'org').present? && user.try(:fullstory_enabled?) && params[:cookies] != '0'
end
end