Thanks, that worked; but you have to include the parens on
the link_to or you get a compile error.
xml.div(''id''=>''menu) {|xml|
xml << link_to("create race",
:controller=>"derby", :action=>"new")
}
-- Tom.
On Mon, 7 Mar 2005 15:35:38 -0700, David Goodlad
<dgoodlad-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> On Mon, 7 Mar 2005 16:07:07 -0600, Tom Jordan
<tdjordan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > Has anyone tried using erb and builder in the same file?
> > Either .rxml or .rhtml?
> >
> > I''m wanting to do some think like the following:
> >
> > xml.div(''id''=>''menu'') {|xml|
> > link_to "create race", :controller=>"derby",
:action=>"new"
> > }
> >
> > Thanks,
> > -- Tom.
> > --
>
> Try doing something like:
>
> xml.div(''id''=>''menu'') { |xml|
> xml << link_to "create race",
:controller=>"derby", :action=>"new"
> }
>
> Or, you can use the #text! method of the builder object too...
>
> Dave
>
> --
> Dave Goodlad
> dgoodlad-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org or
dave-eHfbeeWWzZOw5LPnMra/2Q@public.gmane.org
> http://david.goodlad.ca/
>
--
"Nothing will ever be attempted, if all
possible objections must first be
overcome." - Samuel Johnson