Jump to content

The ultimate community for Ruby on Rails developers.


how to delete routes after generating stuff....

rails routes

  • Please log in to reply
2 replies to this topic

#1 jschrock1



  • Members
  • 48 posts
  • LocationIndianapolis

Posted 26 October 2013 - 08:31 PM

I attempted to follow some guides on uploading images, bla bla bla...  It didn't work that well and I said screw it , need to read more, and deleted all my files, controllers models views etc for the photo stuff...  But noticed when I enter a bad url for my simple app, the photo routes are still there.  See below.  I tried running "generate rails destroy controller photo"  but I still see the routes ..  How do you get rid of these "routes" ??  Thanks again in advance.. appreciate the help  (every post I've put up as been answered quickly and that is aaaawwwwsssooomme..!!


photos_path GET /photos(.:format) photos#index   POST /photos(.:format) photos#create new_photo_path GET /photos/new(.:format) photos#new edit_photo_path GET /photos/:id/edit(.:format) photos#edit photo_path GET /photos/:id(.:format) photos#show   PATCH /photos/:id(.:format) photos#update   PUT /photos/:id(.:format) photos#update   DELETE /photos/:id(.:format) photos#destroy


#2 Ohm



  • Moderators
  • 529 posts
  • LocationCopenhagen

Posted 27 October 2013 - 07:58 AM

All routes are generated via the routes.rb file. You might have a line saying something like

resources :photo

which you can just delete.

Blog: http://ohm.sh | Twitter: @madsohm | Work: Lokalebasen.dk

#3 jschrock1



  • Members
  • 48 posts
  • LocationIndianapolis

Posted 27 October 2013 - 04:05 PM

oh for Pete's sake I thought I looked at that file!! you're right there they are!  I can't tell you how many times I fumble things like this! ugg ok, thank you again, I wish I could rewind my life cause I know I was looking at that file..  My guess is that I was looking at another routes.rb file from a twin project im working that happened to still be in my editor...  lol...

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users