Reputation: 6394
Has anyone found a good Ruby/Rails formatter? There is BeautifyRuby, but it gets strings written like Q%[]
wrong because it aligns everything to the []
and it messes everything up.
Essentially it looks like this from a function auto formatted by beautifyruby:
%x[#{cat_command} &]
%x[#{join_command} &]
return newintroname
end
Does anyone have an idea how to fix this?
Upvotes: 19
Views: 11009
Reputation: 7067
I recommend you to use RuboCop to find all the issues/suggestions/alternatives/good practices in Ruby. It is also available as a Sublime Text plugin.
Ruby Good Practices: https://github.com/bbatsov/ruby-style-guide
Upvotes: 2