What are the different filters 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