Module: TheAuditHelper
- Defined in:
- app/helpers/the_audit_helper.rb
Instance Method Summary collapse
Instance Method Details
#bot_marker(agent) ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'app/helpers/the_audit_helper.rb', line 2 def bot_marker agent return nil unless TheAudit.is_bot?(agent) name = case agent when /yandex/mix :Yandex when /google/mix :Google when /ahrefs/mix :Arefs when /exabot/mix :Exa when /interfax/mix :Interfax when /bing/mix :Bing when /riddler/mix :Riddler else :Bot end content_tag :span, name, class: 'btn btn-warning btn-xs' end |