From 7fe3cf810f28c15ff7e74198bfa6d6f0843b6bfa Mon Sep 17 00:00:00 2001 From: Jonathan Cutrell Date: Sun, 23 Nov 2014 13:03:01 -0500 Subject: Adding simple docs for ActionDispatch::Flash::FlashHash#to_session_value --- actionpack/lib/action_dispatch/middleware/flash.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'actionpack/lib/action_dispatch/middleware/flash.rb') 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} -- cgit v1.2.3 From 6dd0dc3e7217f8af7877c5831b3d8816d156f21e Mon Sep 17 00:00:00 2001 From: Jonathan Cutrell Date: Sun, 23 Nov 2014 13:39:53 -0500 Subject: adding nodoc to private methods --- actionpack/lib/action_dispatch/middleware/flash.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionpack/lib/action_dispatch/middleware/flash.rb') diff --git a/actionpack/lib/action_dispatch/middleware/flash.rb b/actionpack/lib/action_dispatch/middleware/flash.rb index 8fee9c9e8c..a7f95150a4 100644 --- a/actionpack/lib/action_dispatch/middleware/flash.rb +++ b/actionpack/lib/action_dispatch/middleware/flash.rb @@ -79,7 +79,7 @@ module ActionDispatch class FlashHash include Enumerable - def self.from_session_value(value) + def self.from_session_value(value) #:nodoc: flash = case value when FlashHash # Rails 3.1, 3.2 new(value.instance_variable_get(:@flashes), value.instance_variable_get(:@used)) @@ -95,7 +95,7 @@ module ActionDispatch # 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 + def to_session_value #:nodoc: return nil if empty? {'discard' => @discard.to_a, 'flashes' => @flashes} end -- cgit v1.2.3