Module: Pasaporte::CampingFlash
- Defined in:
- lib/pasaporte.rb
Overview
Adds a magicvar that gets cleansed akin to Rails Flash
Instance Method Summary collapse
- #redirect(*argz) ⇒ Object
- #service(*a) ⇒ Object
- #show_error(message) ⇒ Object
- #show_message(message) ⇒ Object
Instance Method Details
#redirect(*argz) ⇒ Object
91 92 93 94 |
# File 'lib/pasaporte.rb', line 91 def redirect(*argz) @state.msg, @state.err = @msg, @err super(*argz) end |
#service(*a) ⇒ Object
86 87 88 89 |
# File 'lib/pasaporte.rb', line 86 def service(*a) @msg, @err = [:msg, :err].map{|e| @state.delete(e) }, super(*a) end |
#show_error(message) ⇒ Object
78 79 80 |
# File 'lib/pasaporte.rb', line 78 def show_error() @err = end |
#show_message(message) ⇒ Object
82 83 84 |
# File 'lib/pasaporte.rb', line 82 def () @msg = end |