Created
July 12, 2012 19:05
-
-
Save bricker/3100188 to your computer and use it in GitHub Desktop.
Debug of the FlashHash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PostsController < ApplicationController | |
def index | |
flash[:notice] = "Testing flash[:notice]" | |
flash.now[:notice] = "Testing flash.now[:notice]" | |
flash[:alert] = "Testing flash[:alert]" | |
flash.now[:alert] = "Testing flash.now[:alert]" | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- &70297189362060 !ruby/object:ActionDispatch::Flash::FlashHash | |
used: !ruby/object:Set | |
hash: | |
:notice: true | |
:alert: true | |
closed: false | |
flashes: | |
:notice: Testing flash.now[:notice] | |
:alert: Testing flash.now[:alert] | |
now: !ruby/object:ActionDispatch::Flash::FlashNow | |
flash: *70297189362060 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= debug flash %> | |
<pre> | |
flash[:notice] == <%= flash[:notice] %> | |
flash.now[:notice] == <%= flash.now[:notice] %> | |
flash[:alert] == <%= flash[:alert] %> | |
flash.now[:alert] == <%= flash.now[:alert] %> | |
</pre> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment