by tptacek · 17y ago · 0 comments
I got addicted to Sinatra because it pretty much begged me to try Haml + jQ --- which is an amazing combination --- and we recently ported all our Erb's to Haml in our Rails app as well.
I think it's a major design mistake to hide or abstract Javascript now that jQuery has pretty much won the JS framework war.
%a.post_link.confirm_link.destructive_link{link_to(@x)}
Hi mom
I'm probably not selling it very well. But basically, you know the old DOM tutorials that talk about how you can do you own tags like: <box name="foo">
<item number="1" />
<item number="2" />
</box>
and then convert it to <div class="box" id="foo">
<div clas="item" id="item_1" />
<div clas="item" id="item_2" />
</div>
or whatever; in Haml, that's just: .box#foo
.item#item_1
.item#item_2I also worry about creating something in HAML and having people not familiar with it not be able to dive into the project and start working right away. I'm actually on the other side of that scenario right now and it's a pain.
But I do have to admit, it's a very pleasing syntax.