Change the route
patch 'edit' => 'books#update'
to
patch '/book.:id/' => 'books#update'
it solves the problem
No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that
you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice
sessions to improve your knowledge and scores.
Q
Which operating system you favour and why?
General Tech
10 Answers
Q
What are the most popular tech portals in India?
General Tech
7 Answers
Q
What are best technologies available today for education / aiding learning?
General Tech
3 Answers
Q
What professional training certifications are most marketable?
General Tech
9 Answers
Q
Q
What is the full form of NABARD ?
Banking, Finance & Insurance
Q
How to refresh app upon shaking the device?
Mobile Technologies
Q
What are the govt exams after BCA?
Career Talk
Q
TYPO3 v8. Override function in Core class
General Tech
Q
Why do people in India give so much importance to Government jobs?
Commerce & Accounting
Q
<div>zkskKsk</div>
Mobile Technologies
0 Answers
Q
<span style="font-size: 1em;">Qwerty 4</span>
Digital Marketing
0 Answers
Q
<div>What are the key differences between AMOLED and LCD displays in smartphones?</div>
Mobile Technologies
0 Answers
Q
<div>What are the key challenges in Mobile App Development for Cross-Platform Solutions?</div>
Mobile Technologies
0 Answers
Q
who is the smallest man in the world
General Tech
0 Answers
manpreet
Best Answer
2 years ago
I am working on an edit page which works. However, when I click the save button to save the changes I make, in rails 4, I get the following message: No route matches [PATCH] "/book.17" Any advice on how to fix this? I have been researching for a while and believe that it has something to do with my routes and not directing to the right page. Just not sure how I should change it. I have tried using patch/put instead of get for my edit action or putting patch 'books#update' to update but get the same error message. Any help will be appreciated! Here is the code:
Controller:
Routes Page:
Edit Page: