我试图按照Railscast 241 Simple OmniAuth进行操作 ,除非我在下面结束时使用Route Globbing /config/routes.rb
:
match '*uri' => "posts#index"
Run Code Online (Sandbox Code Playgroud)
如果我要求/auth/twitter
使用globbing,那么OmniAuth什么都不做:
Started GET "/auth/twitter" for 127.0.0.1 at 2011-04-03 19:17:44 +0200
Processing by PostsController#index as HTML
Parameters: {"uri"=>"auth/twitter"}
Rendered posts/index.html.haml within layouts/application (9.0ms)
Completed 200 OK in 103ms (Views: 14.6ms | ActiveRecord: 0.7ms)
Run Code Online (Sandbox Code Playgroud)
没有通配路线,它可以正确验证.
有没有办法同时拥有路线通配和OmniAuth?