Hi,
On Aug 12, 2009, at 9:33 PM, mtin79 wrote:
> hey everybody,
> as a lot of you i am going away from rjs templates and prototype. in
> favour rendering back javascript responses with ruby intermingled.
> my question is: can i totally replace these "js.erb" files with
> "js.haml". are there any best practices or haml filters to use?
Haml is designed specifically for HTML/XML markup. You're better off
just using ERB (or something similarly general purpose) for templating
other languages.
Rhett
>
> for example one of my "js.haml" files looks like this:
>
> $("cardUserDatetime").text("#{nice_date_time( utc_to_local_time
> (@event.scheduled_at, session[:time_filters][:timezone]) )}")
> $("cardLocationDatetime").text("#{nice_date_time( utc_to_local_time
> (@event.scheduled_at, @event.timezone) )}")
>
> what u think?
>
> m_
> >
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---