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