1 http://robots.thoughtbot.com/post/50655960596/sandi-metz-rules-for-developers Sandi Metz’ rules for developers Classes can be no longer than one hundred lines of code
2 http://robots.thoughtbot.com/post/50655960596/sandi-metz-rules-for-developers Sandi Metz’ rules for developers Methods can be no longer than five lines of code
3 http://robots.thoughtbot.com/post/50655960596/sandi-metz-rules-for-developers Sandi Metz’ rules for developers Pass no more than four parameters into a method. Hash options are parameters.
4 http://robots.thoughtbot.com/post/50655960596/sandi-metz-rules-for-developers Sandi Metz’ rules for developers Controllers can instantiate only one object. Therefore, views can only know about one instance variable and views should only send messages to that object (@object.collaborator.value is not allowed)
0 http://robots.thoughtbot.com/post/50655960596/sandi-metz-rules-for-developers Sandi Metz’ rules for developers You should break these rules only if you have a good reason or your pair lets you
$ rubocop ... C:264: Surrounding space missing for '{'. C:264: Surrounding space missing for '{'. C:264: Space missing to the left of '}'. C:282: Line is too long. [98/79] C:283: Line is too long. [81/79] C:284: Method has too many lines. [45/10] C:287: Prefer single-quoted strings when you don't need string interpolation or special symbols. C:288: Line is too long. [115/79] C:298: Indent when as deep as case. C:300: Indent when as deep as case. C:305: Line is too long. [98/79] C:310: Indent when as deep as case. C:318: Indent when as deep as case. C:320: Indent when as deep as case. ...
class DirtyModel def old_method # body omitted ... end deprecate :old_method def new_method # body omitted ... end if Rails.env.test? alias_method :old_method, :new_method end end