0
我试图让我的应用程序重定向到一个自定义的路由时遇到错误:此网页有重定向循环 - Rails的
Twitter::Error::TooManyRequests
不过,我有困难,出于某些原因我不断收到此错误:
This webpage has a redirect loop
这里是我的控制器:
#app/controllers/tweets_controller.rb
rescue_from Twitter::Error::TooManyRequests, with: :too_many_requests
def too_many_requests
redirect_to too_many_requests_path
end
这里是我的路线:
#config/routes.rb
get "/too_many_requests", to: "tweets#too_many_requests", as: :too_many_requests
我有一个名为too_many_requests.html.erb
我知道我一定是不正确的做事内app/views/tweets
的视图,但有人可以帮忙吗?
感谢
想必你'too_many_requests.html.erb'上有你的Twitter饲料的地方。 – 2014-10-31 14:02:20
这就是我认为,但'too_many_requests.html.erb'目前是空的 – Robbo 2014-10-31 14:13:00