Sha256: 3bbf278df88060ff6e49871d88191e155b16c2eaf34bd3b6cb99f698314fb025
Contents?: true
Size: 623 Bytes
Versions: 17
Compression:
Stored size: 623 Bytes
Contents
module CobotClient module XdmHelper def self.included(base) if base.ancestors.include?(ActionController::Base) base.class_eval do before_filter :capture_xdm_params helper_method :xdm_params end end end def xdm_params session.to_hash.reduce({}) do |hash, element| if element.first.match(/xdm\_/) hash[element.first] = element.last end hash end end def capture_xdm_params params.each do |key, value| if key.match(/xdm\_/) session[key] = value end end end end end
Version data entries
17 entries across 17 versions & 1 rubygems