haml_tag should be indistinguishable from tag, except that it keeps count of
indention.

Buuuut, if in that block, its not scoped or something, then it might not be
there.

On Thu, Mar 19, 2009 at 5:35 PM, Matt Scilipoti <[email protected]> wrote:

>
> haml_tag isn't working either.
>
> I didn't realize that Rails had similar syntax.  This is working:
> tag :meta, 'http-equiv' => 'refresh', :content => interval_secs
>
> Thanks for HAML!
>
> On Mar 19, 2:43 pm, Hampton <[email protected]> wrote:
> >    content_for :meta do
> >          haml_tag :meta, 'http-equiv' => 'refresh', :content =>
> > refresh_interval_secs
> >    end
> >
> > Maybe? I can't remember how content_for captures....
> >
> >
> >
> > On Thu, Mar 19, 2009 at 2:11 PM, MattScilipoti <[email protected]>
> wrote:
> >
> > > Here is code in a view.  I am attempting to convert this to a helper,
> > > so I can pass the refresh_interval_secs:
> > > -# Refresh page every n seconds.
> > > - refresh_interval_secs = '10'
> > > - content_for :meta do
> > >  %meta{'http-equiv' => 'refresh', :content => refresh_interval_secs}
> > > - content_for :content_footer do
> > >  #auto_refresh_msg
> > >    ="Note: This page refreshes automatically, every #
> > > {refresh_interval_secs} secs."
> >
> > > Here's my helper.  I'm having issues using the %meta syntax.
> >
> > > def auto_refresh_page(refresh_interval_secs=10)
> > >    content_for :meta do
> > >      capture_haml(refresh_interval_secs) do |interval|
> > >        %meta{'http-equiv' => 'refresh', :content => interval}
> > >      end
> > >    end
> > >    content_for :content_footer do
> > >      #auto_refresh_msg
> > >      "Note: This page refreshes automatically, every #
> > > {refresh_interval_secs} secs."
> > >    end
> > >  end
> >
> > > Any ideas?
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Haml" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to