The Rails REST implementation dictates the default seven actions for your controllers, but frequently we want to share functionality across multiple actions or even across controllers. Controller filters are the easiest way to do that.
Before, After, and Around
There are three types of filters implemented in Rails:
before_filterruns before the controller action
after_filterruns after the controller action