4

Rails Anti-Patterns?

In this chapter, we will touch on the hot topic of the Rails way controversy. Being almost a 20-year framework, Ruby on Rails has gotten its portion of criticism (it’s doubtful that software used by millions would get only positive feedback). We select the most debated Rails features and discuss how to make friends (not foes) with them. We will start by discussing Action Controller and Active Record callbacks. Then, we will move on to Rails concerns. Finally, we look at different examples of using global state in Rails applications.

We will cover the following topics:

  • Callbacks, callbacks everywhere
  • Concerning Rails concerns
  • On global and current states

This chapter teaches you how to use these debated techniques mindfully ...

Get Layered Design for Ruby on Rails Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.