diff options
author | Jonathan Cutrell <jonathan.cutrell@gmail.com> | 2014-11-23 13:03:01 -0500 |
---|---|---|
committer | Jonathan Cutrell <jonathan.cutrell@gmail.com> | 2014-11-23 13:03:01 -0500 |
commit | 7fe3cf810f28c15ff7e74198bfa6d6f0843b6bfa (patch) | |
tree | 3fef7f2860f3f5ef5bf2300c0c6f72960a5769fb /actionpack/lib/action_dispatch | |
parent | b7b9e92093ed128c2b27a64c5732f6a98191cbf0 (diff) | |
download | rails-7fe3cf810f28c15ff7e74198bfa6d6f0843b6bfa.tar.gz rails-7fe3cf810f28c15ff7e74198bfa6d6f0843b6bfa.tar.bz2 rails-7fe3cf810f28c15ff7e74198bfa6d6f0843b6bfa.zip |
Adding simple docs for ActionDispatch::Flash::FlashHash#to_session_value
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/flash.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/flash.rb b/actionpack/lib/action_dispatch/middleware/flash.rb index 7a91674c3c..8fee9c9e8c 100644 --- a/actionpack/lib/action_dispatch/middleware/flash.rb +++ b/actionpack/lib/action_dispatch/middleware/flash.rb @@ -91,7 +91,10 @@ module ActionDispatch flash.tap(&:sweep) end - + + # Builds a hash containing the discarded values and the hashes + # representing the flashes. + # If there are no values in @flashes, returns nil. def to_session_value return nil if empty? {'discard' => @discard.to_a, 'flashes' => @flashes} |