Skip to content

Commit 8b6b3f7

Browse files
committed
fix UserSessionsController action validation error
1 parent 927ebd8 commit 8b6b3f7

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

config/environments/development.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,9 @@
119119
# Uncomment if you wish to allow Action Cable access from any origin.
120120
# config.action_cable.disable_request_forgery_protection = true
121121

122-
# Raise error when a before_action's only/except options reference missing actions.
123-
config.action_controller.raise_on_missing_callback_actions = true
122+
# Don't raise error when a before_action's only/except options reference missing actions.
123+
# (for example, UserSessionsController has no #index, but that's an error with this enabled)
124+
config.action_controller.raise_on_missing_callback_actions = false
124125

125126
# Apply autocorrection by RuboCop to files generated by `bin/rails generate`.
126127
# config.generators.apply_rubocop_autocorrect_after_generate!

config/environments/test.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
# Annotate rendered view with file names.
7575
# config.action_view.annotate_rendered_view_with_filenames = true
7676

77-
# Raise error when a before_action's only/except options reference missing actions.
78-
config.action_controller.raise_on_missing_callback_actions = true
77+
# Don't raise error when a before_action's only/except options reference missing actions.
78+
# (for example, UserSessionsController has no #index, but that's an error with this enabled)
79+
config.action_controller.raise_on_missing_callback_actions = false
7980
end

0 commit comments

Comments
 (0)