저는 여기 바보 같은 짓을하고 있습니다. 내보기에서경로가 일치하지 않습니다. {: action => "edit", : controller => "blogs"}
나는 다음과 같은 코드를 가지고 : 나는 페이지의 일부 페이지 특정 기능을 표시하는 데 사용하는
- if current_page?(edit_blog_path)
.
ActionController::RoutingError - No route matches {:action=>"edit", :controller=>"blogs"}:
actionpack (3.2.16) lib/action_dispatch/routing/route_set.rb:540:in `raise_routing_error'
actionpack (3.2.16) lib/action_dispatch/routing/route_set.rb:536:in `rescue in generate'
actionpack (3.2.16) lib/action_dispatch/routing/route_set.rb:528:in `generate'
actionpack (3.2.16) lib/action_dispatch/routing/route_set.rb:569:in `generate'
actionpack (3.2.16) lib/action_dispatch/routing/route_set.rb:594:in `url_for'
actionpack (3.2.16) lib/action_dispatch/routing/url_for.rb:148:in `url_for'
actionpack (3.2.16) lib/action_view/helpers/url_helper.rb:107:in `url_for'
내 레이크 노선
는 말한다 :이 다음과 같은 오류가 발생
% rake routes | grep blog
blogs GET /blogs(.:format) blogs#index
POST /blogs(.:format) blogs#create
new_blog GET /blogs/new(.:format) blogs#new
edit_blog GET /blogs/:id/edit(.:format) blogs#edit
blog GET /blogs/:id(.:format) blogs#show
PUT /blogs/:id(.:format) blogs#update
DELETE /blogs/:id(.:format) blogs#destroy
blogs_new POST /blogs/new(.:format) blogs#new
GET /blogs/:id/next(.:format) blogs#next
GET /blogs/:id/previous(.:format) blogs#previous
user_root GET /blog/root(.:format) blogs#root
어떤 단서?
감사합니다.
사용중인 '보기 코드'를 게시하십시오. – Pavan