You can use
:javascript
  alert(#...@user_session.errors.full_messages.join("\n").to_json});

2009/8/3 Noel <[email protected]>

>
> In erb I can do
>
> alert("<%= @user_session.errors.full_messages %>");
>
> How would I do this in HAML
>
> I tried
>
> javascript:
>  alert(" @user_session.errors.full_messages ");
>
> even if I try this it doesn't work.
> javascript:
>  alert("hello");
>
> BTW, I am returning this to an AJAX call via a respond_to block.
>
> What am I doing wrong?
>
> -Noel
>
> >
>


-- 
Regards,

Gabriel Sobrinho
+55 31 8775 8378

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