2

I'm trying to create a rule using ahoy's exclude method to exclude admin users from tracking as suggested here.

But I can't figure out how to get the User object when I only have the controller and request. Any ideas?

Patrick
  • 189
  • 1
  • 6

1 Answers1

0

From the documentation, in your controller, (or ApplicationController), you can skip the action used to track a visit:

skip_before_action :track_ahoy_visit, if: :your_method_here?
Jared
  • 2,885
  • 2
  • 28
  • 31