Refactoring on projects controller and convert erb to haml