No one said you had to use symbols in your Haml.  It's just as happy 
with strings for hash keys (it has to convert the symbols to strings for 
output anyway!).

Sean

Evgeny wrote:
> Aha! Found one! :)
> And example why dash is not really enough ...
>
> Try this ruby code :
>   a = { :a:b => 'a' }
>
> And this xml/html :
>   <elem a:b="a">
>
> The xml/html attribute is common in namespaces, but ruby symbol can't
> contain a colon - it just wont work.
>
> On 7/22/07, Mislav Marohnić <[EMAIL PROTECTED]> wrote:
>   
>> On 7/22/07, Evgeny <[EMAIL PROTECTED]> wrote:
>>     
>>> I tried to search for a list of legal/illegal characters for ruby
>>> symbols, but didn't find anything. Guess only way is to just open up
>>> the source code for String.to_sym or something.
>>>       
>> Symbols in Ruby can have any character that String can. Symbols are just
>> immutable Strings (in some way).
>>
>> But we are not talking about allowed characters in Ruby Symbol, but in HTML
>> attribute. HTML attributes are composed of letters and can have a dash in
>> them. I compensated for that.
>>
>>
>>  >
>>
>>     
>
> >
>   


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