Comment

Comment by fny

If you start hitting performance issues with Rails, switch to using Arel for queries and pump the data into lightweight classes. ActiveRecord optimization magic is a foot bazooka.

If you want to reuse the code between these objects and the corresponding ActiveRecord model, do it with a module.

The biggest problem with Rails is that people get so glued to the conventions that everything gets shoehorned into a model or controller instead of using a better abstraction.

parent fny 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton