I am making a twitter like web app in rails, following a course. I am trying to change the path but every time i start the server i get an eror and the server shuts down.
this is the path:
ActionController::Routing::Routes.draw do |map|
map.resources :posts
map.connect ':controller/:action/:id'
map.connect ':controller/:action/:id.:format'
end
I have done routes before but they haven’t looked like that. I think this is a ruby route where as i’m on rails. I’m not too sure. I thought they would work.
Your resource would look something like this
for the map.connect it’s more like a named route it would look something like
That will make all your controller actions available through a get request. Not sure if that’s really want you want though.