Module: Vanity::Rails::Filters

Defined in:
lib/vanity/frameworks/rails.rb

Overview

Vanity needs these filters. They are includes in ActionController and automatically added when you use #use_vanity in your controller.

Instance Method Summary collapse

Instance Method Details

#vanity_track_filterObject

Filter to track metrics. Pass _track param along to call track! on that alternative.



188
189
190
# File 'lib/vanity/frameworks/rails.rb', line 188

def vanity_track_filter
  Vanity.track! params[:_track] if request.get? && params[:_track]
end