File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
actionpack/lib/action_dispatch/middleware Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -20,10 +20,11 @@ module ActionDispatch
20
20
# end
21
21
# end
22
22
#
23
- # show.html.erb
24
- # <% if flash[:notice] %>
25
- # <div class="notice"><%= flash[:notice] %></div>
26
- # <% end %>
23
+ # Then in +show.html.erb+:
24
+ #
25
+ # <% if flash[:notice] %>
26
+ # <div class="notice"><%= flash[:notice] %></div>
27
+ # <% end %>
27
28
#
28
29
# Since the +notice+ and +alert+ keys are a common idiom, convenience accessors are available:
29
30
#
@@ -41,9 +42,9 @@ class Flash
41
42
KEY = "action_dispatch.request.flash_hash"
42
43
43
44
module RequestMethods
44
- # Access the contents of the flash. Use <tt>flash["notice"]</tt> to
45
- # read a notice you put there or <tt>flash["notice"] = "hello"</tt>
46
- # to put a new one .
45
+ # Access the contents of the flash. Returns a ActionDispatch::Flash::FlashHash.
46
+ #
47
+ # See ActionDispatch::Flash for example usage .
47
48
def flash
48
49
flash = flash_hash
49
50
return flash if flash
You can’t perform that action at this time.
0 commit comments