Module: Touchpoints::Tracker
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/controllers/concerns/touchpoints/tracker.rb
Instance Method Summary collapse
Instance Method Details
#_track_touchpoints ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'app/controllers/concerns/touchpoints/tracker.rb', line 9 def _track_touchpoints touchpoints = Array(session[get(:session_name)]) .then(&method(:keep_only_recent)) .then(&method(:add_if_different)) .then(&method(:persist_if_logged_in)) Touchpoints.debug("Touchpoints: #{touchpoints.inspect}") session[get(:session_name)] = touchpoints.last(get(:capacity)) end |