You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
No. It adds functionality to enhance the user experience by allowing users to submit ISBNs that contain dashes and filtering the dashes out on the backend, instead of showing the user the following error: We could not complete your request. Please make sure you entered an ISBN-10 with no dashes.
Describe the solution you'd like
In the books#create controller action, we can remove the dashes from params[:isbn] before sending it to BookService using a simple regex like so: "978-3-16-148410-0".gsub(/-/, '')
Additional context
I think this will improve the UX since users may sometimes copy their ISBNs with dashes and then have to remove them manually. If maintainers agree, I can work on this.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
No. It adds functionality to enhance the user experience by allowing users to submit ISBNs that contain dashes and filtering the dashes out on the backend, instead of showing the user the following error:
We could not complete your request. Please make sure you entered an ISBN-10 with no dashes.
Describe the solution you'd like
In the
books#create
controller action, we can remove the dashes fromparams[:isbn]
before sending it toBookService
using a simple regex like so:"978-3-16-148410-0".gsub(/-/, '')
Additional context
I think this will improve the UX since users may sometimes copy their ISBNs with dashes and then have to remove them manually. If maintainers agree, I can work on this.
The text was updated successfully, but these errors were encountered: