Ordering of before_action filters in Rails controllers
It turns out that the before_action filters has some special behavior that is not intuitive.
Here are two controllers, with ImagesController inheriting from AdminController.
You'll notice that both have 'before_action: :authenticate_admin!' What do you think will happen when ImagesController#index is called?
class AdminController < ApplicationController
before_action :authenticate_admin!
before_action :set_admin_table_vars, only: [:index, :create, :update]
...
end
class Admin::Content::ImagesController < AdminController
...