Growing Rails - Utilizing Form Models for complex validations or side effects
13-May-2021 1210
Rails by default has a couple of “buckets” to put your code into. Some people claim that this is not sufficient when building larger apps, other people hold against, that you could upgrade your “model” directory and put all kinds of Ruby POROs (Plain Ruby Objects) into it. I am not totally convinced to mix database-backed models and all kinds of different objects, but rather like to identify common patterns and create subdirectories directly under app/, like: app/queries, app/api, app/api_clients or the bespoken Form Models under app/forms.
Growing Rails - Utilizing Form Models for complex validations or side effects #ruby #rubydeveloper #rubyonrails #Growing #Rails #Utilizing #Models #complex #validations #effects https://rubyonrails.ba/link/growing-rails-utilizing-form-models-for-complex-validations-or-side-effects