Advertisement
Guest User

Untitled

a guest
Jul 7th, 2015
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. The action 'index' could not be found for LoginController
  2.  
  3. localhost:3000/login/login
  4.  
  5. No route matches [GET] "/login/login"
  6.  
  7. Prefix Verb URI Pattern Controller#Action
  8. GET /:controller(/:action:(/:id))(.:format) :controller#:action
  9.  
  10. # config/routes.rb
  11.  
  12. # blacklisting - these are not in your controller
  13. resource :users, exclude: [:show, :destroy], via: [:get, :post]
  14.  
  15. # whitelisting - these are in your controller
  16. resource :users, only: [:index], via: [:get, :post]
  17.  
  18. #config/routes.rb
  19.  
  20. resource :login, only: [:index], via: [:get, :post]
  21. match '/login/login' => 'login#login', via: [:get, :post]
  22.  
  23. def index
  24. end
  25.  
  26. class LoginController < ApplicationController
  27. def login
  28. end
  29. end
  30.  
  31. get 'login/login'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement