3 ms·
> Callbacks suck, so write service functions for complicated CRUD. Working around ActiveRecord defaults is like the 2nd thing you learn to do at a serious Rails
by nathan_long 8y ago
> Callbacks suck, so write service functions for complicated CRUD. Working around ActiveRecord defaults is like the 2nd thing you learn to do at a serious Rails shop. I'm afraid you may not have been working with sophisticated Rails engineers, because we certainly modify defaults in our applications.
I'm not sure why you feel like you need to demean my experience to discuss this. Callbacks are extremely commonly used in Rails apps and not at all the province of Rails newbies. Here's DHH in 2018 telling you about how Basecamp uses callbacks: https://www.youtube.com/watch?v=M3JPTOTqsnE https://www.youtube.com/watch?v=M3JPTOTqsnE
And even if you don't like callbacks and never use them, at some point you're going to change jobs or consulting clients and land in a code base that's full of them.
> Elixir is hot, but it's hard to learn and will always have a barrier to entry that Rails won't.
Maybe so. I can't predict to what extent it will catch on, but it's paying my bills. If I get to stay in a happy little niche, that will be fine with me.