[Radiant] Flash in a tag module

Matthew Beale mixonic at synitech.com
Mon Apr 23 18:07:50 CDT 2007


Hi all,

I'm doing some work on an extension, and I'm run into an issue.  I'd
like to pass validation errors on a form back to the tag that draws the
form.  ala:

module FormTags
  include Radiant::Taggable

  desc %{
    Displays the form
  }
  tag "form" do |tag|
    form  = '<form name="form" action="/forms/create">'
    if flash[:error]
      form << '<span class="error">'+flash[:error]+'</span>'
    end
    ...
  end
end

So, how do I access that? controller.flash doesn't work, and nor does
flash (or passing a variable through the class scope).

Thanks for any ideas-

-- 
Matthew Beale :: 607 227 0871
Resume & Portfolio @ http://madhatted.com




More information about the Radiant mailing list