Skip to content

Commit 9be1774

Browse files
committed
docs(tc): explain skip_before_action :accept_terms
1 parent e4b8be8 commit 9be1774

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

app/controllers/terms_and_conditions_controller.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
class TermsAndConditionsController < ApplicationController
2-
before_action :logged_in?
2+
# Skip accept_terms (from ApplicationController) to avoid an infinite redirect loop:
3+
# - If user hasn't accepted T&C, ApplicationController already redirects here
4+
# - If user has accepted, there's no reason to redirect away from this page
5+
# The view handles both cases (needs to accept vs already accepted)
36
skip_before_action :accept_terms
47

58
def show

0 commit comments

Comments
 (0)