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.



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

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