UML Questions for System in Rails

3

My question is the following. Rails controllers for basic CRUD operations require several methods that are repeated throughout the application's controllers. I'm drawing the diagrams for a CBT application that has several CRUD's, and so I'm finding the class diagrams very repetitive.

For example, I have the Employees, Clients, and Products classes. They all have new, create, index, show, edit, update, delete, and destroy methods. Repeating this in the diagrams of the three classes may raise the question: "But an inheritance would not be better?" Maybe, and even would not hurt the DRY. Now, here's the question. How can I do this? Anyone have something to suggest? Or does this repetition in the diagrams have no problem?

    
asked by anonymous 07.07.2014 / 01:00

1 answer

2

In your UML diagram you should put the attributes (table fields) and methods of template , not the controller.

In MVC, you do not always create methods in model classes, you use more controllers. But if you have some specific model logic, can put it there (it does not mean that should of the case).

See also: link

    
07.07.2014 / 13:07