There are a few of us working on a Ruby on Rails project. We have ~10K lines of code. One of the main issues we are having right now is that in some places, the code looks very messy. At times, some of us used Emacs without tabs being set to 2 spaces. At other times, we have code from interns, etc that is just not properly indented.
Basically, I have some very ugly looking code - in .rb files and in .html.erb files. I would like to autoindent these as easily as possible.
I know there are some tools that facilitate this for C++, but I can't seem to find one that would do the job for RoR.
In case I'm not being totally clear, all I want to cleanup is the formatting/indentation of my code:
<% if @test %>
<div class = "test">hello</div>
<% else %>
<div class = "boo">foo</div>
<% end %>
becomes
<% if @test %>
<div class = "test">hello</div>
<% else %>
<div class = "boo">foo</div>
<% end %>
Any ideas on how I can do this?