The web development is usually divided into three subsystems closely integrated to each other. They are: – Model (active record) : all the data logic is handled by this model which in rails is known as the active record library. It acts a bridge between the ruby program code and the main database. View (action view) : the end user sees the view part of the application. Controller (action controller) : it acts as a data broker of an application. It also helps in handling the logic which allows the model and view to communicate with one another. This is how the model view controller framework used in ruby on rails.
The methods which are used before and after the action of the controller method are executed. It ensures that the code runs with the given action method which is called. Three types of filters are supported by rails. They are: Before filters: these filters are executed before the execution of the code in the action controller. After filters: these filters are executed after the execution of the code in the action controller. Around filters: these are executed both before and after the execution of the code present in the action controller.
Comments
Post a Comment