Rails encourages usage of callbacks in controllers to execute common pieces of code before or after an action. A very simple example of this is calling the authenticate_user! method from Devise before every action to make sure that user is authenticated. class ApplicationController < ActionController::Base before_action :authenticate_