当前位置: 动力学知识库 > 问答 > 编程问答 >

ruby on rails - How do I cause a browser redirect from a gem?

问题描述:

I'm creating a gem and I was wondering how I can add a browser redirect. For example, if a class method from the gem is called in a Rails controller, the browser will redirect to a new url.

I can only seem to launch a URL in a new tab/window. In Rails I would call a simple redirect_to but I'm not sure of how to do this in Ruby alone.

分享给朋友:
您可能感兴趣的文章:
随机阅读: