Haml passes all evaluated code through as straight Ruby. I think the issue here is that in the RHTML version, there's a space between the conditional and the "link_to_unless" and in the Haml version there isn't... this causes Ruby to think that link_to_unless is being passed only one parameter, the result of the condition.
Because these two cases are so ambiguous, though, it might be a good idea to wrap everything with parentheses anyway. - Nathan Jeff wrote: > RHTML lets me get away with this: > > <li><%= link_to_unless (my_condition), 'my sites', my_url(@member) %></ > li> > > HAML seems to assume that (my_condition) closes the link_to_unless > method and throws on this statement: > > %li > = link_to_unless(my_condition), 'my sites', my_url(@member) > > HAML requires me to enclose all the args in parentheses: > > %li > = link_to_unless((my_condition), 'my sites', my_url(@member)) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
