Module: SimpleWorkflow::Detour
- Included in:
- Controller, Middleware
- Defined in:
- lib/simple_workflow/detour.rb
Instance Method Summary collapse
Instance Method Details
#reset_workflow(session) ⇒ Object
12 13 14 |
# File 'lib/simple_workflow/detour.rb', line 12 def reset_workflow(session) session.delete(:detours) end |
#store_detour_in_session(session, options) ⇒ Object
2 3 4 5 6 7 8 9 10 |
# File 'lib/simple_workflow/detour.rb', line 2 def store_detour_in_session(session, ) if session[:detours] && session[:detours].last == Rails.logger.try(:debug, "Ignored duplicate detour: #{options.inspect}") return end session[:detours] ||= [] session[:detours] << Rails.logger.try(:debug, "Added detour (#{session[:detours].try(:size) || 0}): #{options.inspect}") end |