Using HAML with FBML

Just a quick post here, hopefully I'll get around to making some more posts. I've been busy getting my current job's project http://openstudy.com/ up in open mode. Still very beta, but very cool.

 Anyway, we needed to use FBML with HAML at some point, and it turns out that's super easy. Here's how to render a login-button from FBML in HAML:

 
  %fb:login-button{:size => 'medium', :length => 'long', |           :onlogin => 'facebookUserLoggedIn();'} |

 Remember that the pipe symbol (|) is used for line continuations in HAML. I like to keep my lines at 80 characters or less. Other than that, the rest is the usual HAML syntax. Using namespaced syntax is perfectly kosher in HAML, so you don't need to do any extra work.

 Hope this comes in useful to some people!