Skip to content

Use Rails 5.2 defaults#278

Open
vangberg wants to merge 1 commit into
mainfrom
rails-5-2-defaults
Open

Use Rails 5.2 defaults#278
vangberg wants to merge 1 commit into
mainfrom
rails-5-2-defaults

Conversation

@vangberg

Copy link
Copy Markdown
Contributor

The one necessary change was to remove protect_from_forgery(with: :exception) since this is now implicitly part of the controller callbacks. Verified with:

% bundle exec rails runner 'ApplicationController._process_action_callbacks.select { |cb| cb.kind == :before }.each_with_index { |cb, i| puts "#{i+1}: #{cb.filter.inspect}" }'
1: :verify_authenticity_token
2: :set_turbolinks_location_header_from_session
3: :check_api!
4: :store_user_location!

which still includes verify_authenticity_token.

Part of #277.

The one necessary change was to remove `protect_from_forgery(with: :exception)`
since this is now implicitly part of the controller callbacks. Verified with:

```
% bundle exec rails runner 'ApplicationController._process_action_callbacks.select { |cb| cb.kind == :before }.each_with_index { |cb, i| puts "#{i+1}: #{cb.filter.inspect}" }'
1: :verify_authenticity_token
2: :set_turbolinks_location_header_from_session
3: :check_api!
4: :store_user_location!
```

which still includes `verify_authenticity_token`.

Part of #277.
@vangberg vangberg mentioned this pull request Jun 16, 2026
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant