新手问题 为什么 controllers 下找不到这个文件?

kitt · 2013年04月08日 · 最后由 raven 回复于 2013年04月08日 · 2401 次阅读

登录是用插件 Devise 做的,rake routes 下有这么一条路由 user_session POST /users/login(.:format) {:action=>"create",:controller=>"devise/sessions"}

这是后台信息 Started POST "/users/login" for 127.0.0.1 at 2013-04-08 10:51:56 +0800 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "authenticity_token"=>"kxYtv8ApAjMF5VihexwYF+GbTD//2xe3OzGRzlyaWpg=", "user"=>{"login"=>"sdf", "password"=>"[FILTERED]"}}

可是在 controllers 下没有 devise 这个文件夹,也没有 sessions 这个文件。grep 整个 app 目录,也没找到 Devise::SessionsController 字符串。 这个 controller 到底在什么地方呢额

这个在 devise 的 gem 里面。

bundle open devise then you can find the file. :p

需要 登录 后方可回复, 如果你还没有账号请 注册新账号