Skip to content

Instantly share code, notes, and snippets.

@bricker
Created July 12, 2012 19:05
Show Gist options
  • Save bricker/3100188 to your computer and use it in GitHub Desktop.
Save bricker/3100188 to your computer and use it in GitHub Desktop.
Debug of the FlashHash
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
--- &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
<%= 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