|
|
|
|
|
by Fire-Dragon-DoL
2105 days ago
|
|
I did delete this post, I'm not sure how it came back. I wasn't happy with my answer. I would avoid any logic in the models, they already have 3 responsibilities (data gateway, data holder and validation). For CRUD apps, Rails has competitors that can't be overlooked, there are alternatives: PostgREST, Hasura + Forst Admin provide full crud UI with borderline no code. In all honesty, you don't have to look far. Elixir + Phoenix, which is not free of mistakes, manages to be a better Rails than Rails itself. The validation is isolated, the database access is isolated from the model, no autoloading is involved. |
|