Skip to content

Commit

Permalink
Remove free usage of #tap
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosantoniodasilva authored and robotex82 committed Nov 8, 2012
1 parent f66ec25 commit 9a68393
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions actionpack/lib/action_dispatch/middleware/flash.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,14 @@ def self.from_session_value(value)
else
new
end

flash.tap(&:sweep)

flash.sweep
flash
end

def to_session_value
return nil if empty?
{'discard' => @discard.to_a, 'flashes' => @flashes}
{ 'discard' => @discard.to_a, 'flashes' => @flashes }
end

def initialize(flashes = {}, discard = []) #:nodoc:
Expand Down

0 comments on commit 9a68393

Please sign in to comment.