thanks everybody for the answers! i think i get it.
i guess for simple js scripts being sent back to the client a stick
with the approach above. i just like going haml as long as possible.
other things are going the erb way then ...
are there any attemps of extending haml to cope with js responses or
is anybody using something different then erb or haml?
anyway: love the haml templating system...

On 13 Aug., 05:25, Noel <[email protected]> wrote:
> that's what I ended up doing as well.  Thought I could get away from
> erb all together, but not for JS.
>
>
>
> On Wed, Aug 12, 2009 at 7:50 PM, Rhett Sutphin<[email protected]> wrote:
>
> > 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to