Ruby: Account for filter skip ordering

A `skip_*_filter :foo` call only has an effect if there was an earlier
call that registered `:foo` as a filter.
This commit is contained in:
Harry Maclean
2023-01-30 18:50:30 +13:00
parent a164e76a5d
commit 246ad46eb1
3 changed files with 61 additions and 33 deletions

View File

@@ -6,6 +6,8 @@ class PostsController < ApplicationController
# these calls override the earlier ones
after_action :log_upvote, only: :upvote
before_action :set_user
skip_before_action :set_user
before_action :set_user
def index
end