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:
@@ -1,7 +1,7 @@
|
||||
require_dependency 'oneboxer'
|
||||
|
||||
class OneboxController < ApplicationController
|
||||
prepend_before_action :check_xhr, :ensure_logged_in
|
||||
requires_login
|
||||
|
||||
def show
|
||||
unless params[:refresh] == 'true'
|
||||
|
||||
Reference in New Issue
Block a user