Format Class Name

Hi,

I have a loop which loops through all the associations for a particular
model, what i want is to display a label with the class name formatted
like “My Class Name”

<% @project.reflect_on_all_associations.each do |association| %>
<%= association.name %>
<%= association.class.name %>
<% end %>

The above gives me “my_class_name” and the second output gives me
“MyClassName” but what i want is My Class Name" without the underscore
and with a space after the capitals. Is there a quick way to this with
rails or do i need to write a method to handle this?

Any Advice appreciated,

Johnny B