What are the components defined in the model from MVC architecture? - Ruby on Rails

What are the components defined in the model from MVC architecture?



The components involved in defining the model are as follows:

-Validations: this is one of the very essential components and it defines the validations that are being put up on the input type of stream like validate_presence_of, format_of, etc.
- Relationship: this is another type of component that describe the relationship between different types of components and it shows the relationship in the form of has_one, has_many, etc.
- Callbacks: this is essential when it comes to respond after the failure and it allows the application to have certain functionality during failure. This can be given as before_save, after_save, etc.
- Validation group settings: allow users to define the installed plugin settings.
- Active record association relationship: allows current records to be actively having the relationship between one another.
Post your comment