No route matches controller in rails app -


i have app i'm creating action called "new_911". when put new_911_call_path in application layout error "no route matches new_911 controller: calls". yet there action in calls controller called new_911. doing wrong?

calls controller:

def new_911     @call = call.new :call_status => "open"     respond_with @call end 

application.html.erb

<li><%= link_to 'new 911 call', new_911_call_path %></li> 

routes.rb

resources :calls     member       post 'close'       post 'cancel'       post 'note'        'new_return'       'duplicate_call'       'edit_times'       put 'update_billing'       'new_911'     end 

rake routes: new_911_call /calls/:id/new_911(.:format) calls#new_911

you need add parameter route. you're using member route need add id parameter, take of this. may need change route.


Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -