Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

fix authors with periods in names #1357

Merged
merged 1 commit into from
Aug 26, 2024

Conversation

sneakers-the-rat
Copy link
Contributor

@sneakers-the-rat sneakers-the-rat commented Aug 15, 2024

Fix: #1346

The problem was that names with periods in them were interpreted as being a file extension (perhaps reasonably?) by the router. So clicking on "Author T. Lastname" in a paper would be interpreted by rails as {author: "Author T", format: " Lastname"}

So i added a constraint that matches any string excluding the three formats that it looks like there were responders for and added tests - don't know if i put the tests in the right spot, there weren't any tests for the papers/by/:author route so i just put it with the controller.

edit: i find ruby's formatting norms to be bewildering and bad, and i didn't notice a linter config in this repo, so sorry if my indentation is weird, feel free to request edits.

@arfon
Copy link
Member

arfon commented Aug 26, 2024

Oooo, nice! Thanks for spotting (and fixing) this.

@arfon arfon merged commit 9cd9623 into openjournals:main Aug 26, 2024
1 check passed
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.

papers/by/AUTHOR page doesn't work for names containing period characters
2 participants