Sha256: 183fb23dfa7d965743147ea010dde706226ee86f8cfb57ab677e957c2665c63a
Contents?: true
Size: 488 Bytes
Versions: 7
Compression:
Stored size: 488 Bytes
Contents
# frozen_string_literal: true # Sets the value in the session # # {%set_session name value%} # {%set_session locale 'nl'%} # {%set_session locale request.query_parameters['lang']%} # {%set_session locale request.query_parameters['lang']%} # {%set_session coupon_code 'beyou'%} class SetSessionTag < LiquidumTag def render(context) super context.registers['controller'].session[argv1] = sargs.first '' end end Liquid::Template.register_tag('set_session', SetSessionTag)
Version data entries
7 entries across 7 versions & 1 rubygems