Class: Crystal::Processors::PrepareFlash
- Inherits:
-
Crystal::Processor
- Object
- Crystal::Processor
- Crystal::Processors::PrepareFlash
- Defined in:
- lib/crystal/html/processors/prepare_flash.rb
Instance Attribute Summary
Attributes inherited from Crystal::Processor
Instance Method Summary collapse
Methods inherited from Crystal::Processor
Constructor Details
This class inherits a constructor from Crystal::Processor
Instance Method Details
#call ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/crystal/html/processors/prepare_flash.rb', line 5 def call workspace.request.must_be.present workspace.params.must_be.defined = workspace.request.session.delete 'flash' if .present? = JSON.load crystal[:flash] = Crystal::Flash.new workspace.params.format, end next_processor.call if crystal.include? :flash flash = crystal[:flash] = flash. workspace.request.must_be.present workspace.request.session['flash'] = .to_json unless .empty? end end |