Module: CobotClient::XdmHelper
- Defined in:
- app/helpers/cobot_client/xdm_helper.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'app/helpers/cobot_client/xdm_helper.rb', line 3 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 |
Instance Method Details
#capture_xdm_params ⇒ Object
21 22 23 24 25 26 27 |
# File 'app/helpers/cobot_client/xdm_helper.rb', line 21 def capture_xdm_params params.each do |key, value| if key.match(/xdm\_/) session[key] = value end end end |
#xdm_params ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'app/helpers/cobot_client/xdm_helper.rb', line 12 def xdm_params session.inject({}) do |hash, element| if element.first.match(/xdm\_/) hash[element.first] = element.last end hash end end |