Sha256: 3d84f341ce5e1fb9bcfc689691b144ed6d9177e031d8bdd635296b3ecbb928be
Contents?: true
Size: 671 Bytes
Versions: 24
Compression:
Stored size: 671 Bytes
Contents
rad.html class PrepareFlash < Rad::Conveyors::Processor def call workspace.request.must_be.present workspace.params.must_be.defined previous_messages = workspace.request.session.delete 'flash' if previous_messages.present? previous_messages = JSON.load previous_messages rad[:flash] = Rad::Html::Flash.new workspace.params.format, previous_messages end next_processor.call if rad.include? :flash flash = rad[:flash] messages = flash.messages_for_next_request workspace.request.must_be.present workspace.request.session['flash'] = messages.to_json unless messages.empty? end end end
Version data entries
24 entries across 24 versions & 1 rubygems