开发者

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 n开发者_开发百科ew tab/window. In Rails I would call a simple redirect_to but I'm not sure of how to do this in Ruby alone.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜