Refactor requires login logic, reduce duplicate code
This also corrects the positioning in the chain of the check and removes misuse of prepend_before_action
This commit is contained in:
@@ -8,7 +8,7 @@ require_dependency 'post_locker'
|
||||
|
||||
class PostsController < ApplicationController
|
||||
|
||||
prepend_before_action :check_xhr, :ensure_logged_in, except: [
|
||||
requires_login except: [
|
||||
:show,
|
||||
:replies,
|
||||
:by_number,
|
||||
|
||||
Reference in New Issue
Block a user