Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialDanish Saleem
7,965 PointsNo route matches [DELETE] "/pages/4"
Hi when i apply the delete method and try to delete one of my record i get this error No route matches [DELETE] "/pages/4"
although i have already defined the route in route.rb file
plz help
1 Answer
Shahzaib Awan
13,767 Pointsinstead of custom routes use resources 'pages' in your route.rb file and define deleted method on that link which leads to delete a page like this <%= link_to 'Delete', page_path(some_page_id) method: :delete %>
Ethan Rivas
9,979 PointsEthan Rivas
9,979 PointsCan you tell me what your console returns if you enter this command?: rake routes