Converting views to haml type