Added dom_for_model method