Try this:
%a{"data-toggle-description-length" => "toggle_me_ajax", href: "#"}
OR
%a{href: "#", :data => {:toggle_description_length => "toggle_me_ajax"}}
For more details refer here
You can also use html2haml converter available online
EDIT:
As mentioned in comments there are a couple more syntaxes which would work
%a{href: "#", { "data-toggle-description-length": "toggle_me_ajax" }}
OR
%a{href: "#", { :"data-toggle-description-length" => "toggle_me_ajax" }}
I would still prefer first two though as I think latter ones look ugly and kinda messy.