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 = ''
if flash[:erro
Tags exist in the Page model (or a subclass) when processing, so they
really only have access to the model layer. *However*, the Page model
has available to it the request and response objects. There are other
ways to tackle the problem, but you could try getting the information
from the resp
Sean Cribbs wrote:
> Tags exist in the Page model (or a subclass) when processing, so they
> really only have access to the model layer. *However*, the Page model
> has available to it the request and response objects. There are other
> ways to tackle the problem, but you could try getting the
On Mon, 2007-04-23 at 22:44 -0400, John W. Long wrote:
> Sean Cribbs wrote:
> > Tags exist in the Page model (or a subclass) when processing, so they
> > really only have access to the model layer. *However*, the Page model
> > has available to it the request and response objects. There are oth
On Mon, 2007-04-23 at 21:00 -0500, Sean Cribbs wrote:
> Tags exist in the Page model (or a subclass) when processing, so they
> really only have access to the model layer. *However*, the Page model
> has available to it the request and response objects. There are other
> ways to tackle the pro
> Then in the tag:
>
> request.params[:error]
>
> Only issue is rails doesn't put the GET params into the request.params
> object, it only puts them in the params object, which isn't accessible
> from the tag.
>
>
Try request.parameters[:error]. params is a shorthand introduced in
ActionCont
On Tue, 2007-04-24 at 09:50 -0500, Sean Cribbs wrote:
> > Then in the tag:
> >
> > request.params[:error]
> >
> > Only issue is rails doesn't put the GET params into the request.params
> > object, it only puts them in the params object, which isn't accessible
> > from the tag.
> >
> >
> Try req
What if you set a local variable in the Page model? You could use an
attr_accessor method called Page#flash.
Or, you could use a cattr_accessor and define some flash methods like
this:
class Page < ...
cattr_accessor :flash
def self.flash=(message)
@@flash = {}
@@flash[:messa