top | item 37677410

(no title)

lobstrosity420 | 2 years ago

It is in fact how it was designed to be used, you can read the reasoning here: https://dev.37signals.com/globals-callbacks-and-other-sacril...

discuss

order

Toutouxc|2 years ago

The reasoning being basically "fuck Ruby and consistent OOP practices, this is how we roll". I used to be fine with this, but the more I work with Rails, the more I feel like it's trying to make me a worse programmer. Business logic in controllers, service "objects" (not actually objects at all), the OOP abomination that are models with dozens of different behaviors and agendas inherited via concerns. In Rails you can always pick your poison, but you don't seem to be allowed not to be poisoned.

lobstrosity420|2 years ago

> Maximalist positions are a thing in our industry. Take a technique, outline its drawbacks, extrapolate you can’t use it under any circumstance, and ban it forever. We are lucky that Rails embraces exactly the opposite mindset as one of its pillars.

revscat|2 years ago

You may want look into dry-transaction and railway oriented programming.