You would need some kind of JavaScript-HAML library for that ... and bundle
it with Ruby on Javascript as well, to handle the link_to methods you are
trying to call.
This just does not make sense, you are trying to run HAML and Ruby on Rails
in a user's browser.

Please, don't.

On Wed, Nov 26, 2008 at 18:35, rvr <[EMAIL PROTECTED]> wrote:

>
> how do i handle haml inside inline js so that it will get processed?
> this code works fine except that the markup inside the document.write
> statements is treated as plain text.
>
>      :javascript
>        if (document.cookie.indexOf('signed_in') == -1) {
>          document.write('%li.first= link_to("Sign In", :controller =>
> "user", :action => "sign_in")');
>          document.write('%li.last= link_to("Create
> Profile", :controller => "user", :action => "create")');
>        } else {
>          document.write('%li.first= link_to("My Account", :controller
> => "user", :action => "user")');
>          document.write('%li.last= link_to("Sign Out", :controller =>
> "user", :action => "sign_out")');
>        }
>
> any help is appreciated.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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