Re indent
Fix Rails 3 compat
Re indent
Re indent
Minor correction
Fix Rails 3 compat