What are most common Ruby on Rails antipatterns and how to avoid them?
Alphabet Soup?
(No type declared and meaningless variable naming which leads to nearly un-readable code)
Pattern name comes from variables names as 'a','b','c','d', etc.
There are two major anti-patterns I've seen in a lot of Rails code:
Lots of "heavy lifting" in views. Anything more complicated than simple iteration over collections or interpolation of strings should be in helpers or model methods. Don't query for model objects, construct big JSON arrays, or update session variables from your ERB templates.
Model objects which aren't usable for scripting or API implementation. Your models define the domain semantics for your application. You should be able to fire up script/console, or write service API wrappers, which reuse existing, functional model methods to manipulate all of the key data in your application. Controller functionality is only available in the HTTP request/response cycle, which is only part of any full-featured site's lifecycle.