Ruby Source code Auto-Formatter

joni picture joni · Jun 10, 2013 · Viewed 9.2k times · Source

What is the best option? I found:

but they both seem slightly outdated. Special support for Rails (Knowing which files to format automagically and some other cool things) would be a plus, and a git hook script.

Answer

Dorian picture Dorian · Jun 27, 2014

There is RuboCop:

gem install rubocop
rubocop -a

It will also fix all the common mistakes.