"elsif", not "else if" ;-).

iwasinnamuknow wrote:
> I'm using the haml gem and it's great, been using it for a while and I
> love it.
>
> I've got a problem trying to display the flash messages, if I do the
> following:
>
>      - if flash[:notice]
>        #flashNotice
>          =flash[:notice]
>      - else if flash[:error]
>        #flashError
>          =flash[:error]
>      - end
>
> I get
>
> You don't need to use "- end" in Haml. Use indentation instead:
> - if foo?
>   %strong Foo!
> - else
>   Not foo.
>
> Ok, so I take out "- end" and I get
>
> default.haml:21: syntax error, unexpected $end, expecting kEND
>
> So which is it? What do I have to do to get around this? My
> indentation is perfect, so I don't see what else I can do.
> Incidentally this appears to be a new problem with the latest version
> of haml. Before I was using "- end" and it worked perfectly.
>
> Any help appreciated.
>
> Thanks
>
> Matt
>
> >
>
>   


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