Skip to content

Use Rails 5.2 defaults#278

Merged
lmrodriguezr merged 1 commit into
mainfrom
rails-5-2-defaults
Jun 30, 2026
Merged

Use Rails 5.2 defaults#278
lmrodriguezr merged 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.

@vangberg vangberg mentioned this pull request Jun 16, 2026
4 tasks
@vangberg vangberg requested a review from lmrodriguezr June 18, 2026 07:53
@lmrodriguezr

Copy link
Copy Markdown
Member

Is the change in app/controllers/application_controller.rb still needed? This PR will need re-basing

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 force-pushed the rails-5-2-defaults branch from a31b07d to dca0621 Compare June 29, 2026 12:28
@vangberg

Copy link
Copy Markdown
Contributor Author

It's been rebased.

@lmrodriguezr lmrodriguezr merged commit 8b31d8e into main Jun 30, 2026
3 checks passed
@lmrodriguezr lmrodriguezr deleted the rails-5-2-defaults branch June 30, 2026 07:06
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.

2 participants