My new <r:flash/> tag - perhaps it is of some use:
desc %{
Returns the requested element of the flash for use in layout/page
display.
*Usage:*
<pre><code><r:flash key="notice"/></code></pre>
}
tag "flash" do |tag|
if key = tag.attr['key']
flash =
tag.locals.page.response.template.controller.session['flash']
flash ? (flash[key] || flash[key.to_sym] || '') : ''
else
raise TagError.new("`flash' tag must contain `key' attribute")
end
end
On 10/21/10 4:21 PM, Wes Gamble wrote:
All,
1) I read in this post from back in '08
(http://www.ruby-forum.com/topic/142224) that the SiteController had
sessions disabled by default.
Sessions are enabled in my SiteController (which is good, since I am
doing lots of user-centric stuff). When did that change in the base
Radiant install (or did I turn them on and not remember doing it).
2) I would like to take advantage of the flash for standard
informational messages in my UI. But there is no built-in access to
the flash. Has anyone built a tag to access the flash and would you
be willing to share it?
Thanks,
Wes