1
현재 RoR의 블로그 엔진에서 작업 중이며 라우팅 문제가 있습니다. routes.rb
은 다음과 같습니다Rewriting Rails 경로
match '/admin', :to => 'posts#new'
match '/get/:id', :to => 'posts#get'
match '/new', :to => 'posts#new'
delete '/:id', :to => 'posts#destroy'
post '/edit/:id', :to => 'posts#update'
put '/edit/:id', :to => 'posts#update'
get '/edit/:id', :to => 'posts#new', :as => 'post'
get '/:slug', :to => 'posts#show', :as => 'post'
root :to => 'posts#index'
을하고 내가 좋아하는 뭔가를 변환하고 싶습니다 :
resources :admin do
resources :posts
end
어떤 도움을 매우 극명하게 될 것이다.