If I have two tables in User User and Userinfo (separation into normalization ), I generate two User, UserInfo models and use them as usual through relationships.
Later, I have a section of my application that reads and writes for both, however there is enough business logic to create records, for example, to search for other tables for conditional rules, build rows, etc.
Would it make sense to make a third model (a model with support without a database) to handle all this and create / save through two other models? or should i keep this in the controller?
Another example would be importing a CSV file, where all the data is shared between different tables, separate models used by the rest of the application. Can I use a model that defines each row that processes imported data through other models. Or should it be in the controller again?
I'm interested in best practices when developing applications with large rails.
user427165
source
share