Skip to content

Fix route_param documentation and type #943

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Oct 18, 2024

Conversation

4ndv
Copy link
Contributor

@4ndv 4ndv commented Oct 12, 2024

Grape::Entity#merge_params returns route.params, which effectively discards result of code above this line, because route.params produces new object each time it's called

Fixes #942 and (potentially) #325

Side note: I think filter condition in delete_if at least requires an explanation comment/revision, because it's a little bit cryptic

@4ndv 4ndv changed the title Fix Grape::Endpoint#merge_params, now it should return correct result Fix route_param documentation and type Oct 12, 2024
@4ndv 4ndv force-pushed the fix-merge-params branch from 7ac816d to 4894fa6 Compare October 12, 2024 20:18
@4ndv 4ndv force-pushed the fix-merge-params branch from 4894fa6 to 57e9bab Compare October 12, 2024 20:21
@dblock dblock merged commit fddae76 into ruby-grape:master Oct 18, 2024
31 checks passed
@dblock
Copy link
Member

dblock commented Oct 18, 2024

Looks right, thanks for fixing this!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Type, description and documentation is ignored when mounting class inside route_param
2 participants