..to resist. The more I write in Rails the more I find myself converting rhtmls to Markaby, another invention of _why’s genius.

table do
  for project in @projects
    tr.project :id => "#{project.name}" do
      render :partial => 'project', :locals => {:project => project }
    end
  end
end
br
link_to 'New project', new_project_url

The fact that template become a ruby script with all the syntax support from IDE is very powerful also. With conventional IDE I see the scopes of all those container elements like divs. This is also true for rthml, but not so for HAML which stops me from trying it – though it seems to be much more popular rendering engine these days.

The thing that stopped me for a while from using Markaby in all my templates is that forms were usually broken when rendered completely with it. What helped is to write ‘form_for’ in some wrapper rhtml and the form body in partial.mab.Now I’ve learned how to write the form wrapper in Markaby too: this ticket has all the answers I need. It’s a pity the ticket is not resolved: it says it’s a year old!



2 Responses to “Markaby you’re too beautiful”  

  1. 1 jonty

    I totally agree with you – I have a project to do writing a mini website – no data so I intend to use camping – I am beginning to get my head round markaby and am delighted with it but _Why is busy on other stuff these days.

  2. 2 thirstydoh

    The good thing about it is that you (or me) can fix it, _why makes contributing revolutionally simple – all you need is Rubyforge account. Happy example of opensource triumph: here.


Leave a Reply